/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PikaLife.java
 *
 * Created on Jul 31, 2012, 9:01:08 PM
 */

package Model;

import Model.dialog.*;
import DataBase.DBManagerment;
import DataBase.PikaTableModel;
import Model.dialog.dlgAddBill;
import Processing.MD5Passing;
import Processing.dbclass.*;
import java.awt.CardLayout;
import java.sql.Connection;
import javax.swing.JOptionPane;

/**
 *
 * @author Admin
 */
public class PikaLife extends javax.swing.JFrame {

    /**
     * Đối tượng của class DBManagerment
     */
    private DBManagerment db = new DBManagerment();

    /**
     * Một Connection
     */
    private Connection con;

    /** Creates new form PikaLife */
    public PikaLife() {
        initComponents();       

        this.setSize(this.getMinimumSize());

        this.setLocationRelativeTo(null);
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btgStaffGender = new javax.swing.ButtonGroup();
        btgPaid = new javax.swing.ButtonGroup();
        btgPatientGender = new javax.swing.ButtonGroup();
        pnlLogin = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtUserName = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        pssPassWord = new javax.swing.JPasswordField();
        btnLogin = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        pnlMain = new javax.swing.JPanel();
        pnlPatientList = new javax.swing.JPanel();
        pnlPatientListMain = new javax.swing.JPanel();
        pnlPatientStatic = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbPatientList = new javax.swing.JTable();
        pnlPatientTotal = new javax.swing.JPanel();
        lblPatientTotal = new javax.swing.JLabel();
        pnlPatientListBar = new javax.swing.JPanel();
        btnPatientAdd = new javax.swing.JButton();
        btnPatientEdit = new javax.swing.JButton();
        btnPatientDelete = new javax.swing.JButton();
        cbbPatientSearch = new javax.swing.JComboBox();
        btnPatientSearch = new javax.swing.JButton();
        txtPatientSearch = new javax.swing.JTextField();
        btnPatientStatistic = new javax.swing.JButton();
        pnlStaffList = new javax.swing.JPanel();
        pnlStaffListBar = new javax.swing.JPanel();
        btnStaffAdd = new javax.swing.JButton();
        btnStaffEdit = new javax.swing.JButton();
        btnStaffDelete = new javax.swing.JButton();
        cbbStaffSearch = new javax.swing.JComboBox();
        btnStaffSearch = new javax.swing.JButton();
        txtStaffSearch = new javax.swing.JTextField();
        pnlStaffListMain = new javax.swing.JPanel();
        pnlStaffStatistic = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbStaffList = new javax.swing.JTable();
        pnlStaffTotal = new javax.swing.JPanel();
        lblStaffTotal = new javax.swing.JLabel();
        pnlBilling = new javax.swing.JPanel();
        pnlBillingMain = new javax.swing.JPanel();
        pnlBillingTable = new javax.swing.JPanel();
        pnlBillingList = new javax.swing.JPanel();
        pnlPurchase = new javax.swing.JPanel();
        pnlTestPurchase = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        tbTestPurchase = new javax.swing.JTable();
        pnlTestPurchaseTotal = new javax.swing.JPanel();
        lblTestPurchaseTotal = new javax.swing.JLabel();
        pnlStockPurcahse = new javax.swing.JPanel();
        jst2 = new javax.swing.JScrollPane();
        tbStockPurchase = new javax.swing.JTable();
        pnlStockPurchaseTotal = new javax.swing.JPanel();
        lblStockPurchaseTotal = new javax.swing.JLabel();
        pnlBill = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tbBilling = new javax.swing.JTable();
        pnlBillTotal = new javax.swing.JPanel();
        lblBillTotal = new javax.swing.JLabel();
        pnlBillTotalMoney = new javax.swing.JPanel();
        lblTotalMoney = new javax.swing.JLabel();
        pnlBillingPatient = new javax.swing.JPanel();
        pnlBillingPatientTotal = new javax.swing.JPanel();
        lblBillingPatientTotal = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        tbPatientListInBill = new javax.swing.JTable();
        pnlBillingBar = new javax.swing.JPanel();
        btnBillingAdd = new javax.swing.JButton();
        btnBillingEdit = new javax.swing.JButton();
        btnBillingDelete = new javax.swing.JButton();
        cbbBillingSearch = new javax.swing.JComboBox();
        btnBillingSearch = new javax.swing.JButton();
        txtBillingSearch = new javax.swing.JTextField();
        btnBillingStatistic = new javax.swing.JButton();
        pnlReport = new javax.swing.JPanel();
        pnlReportMain = new javax.swing.JPanel();
        pnlReportStatic = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tbReport = new javax.swing.JTable();
        pnlReportTotal = new javax.swing.JPanel();
        lblReportTotal = new javax.swing.JLabel();
        pnlReportBar = new javax.swing.JPanel();
        btnReportAdd = new javax.swing.JButton();
        btnReportEdit = new javax.swing.JButton();
        btnReportDelete = new javax.swing.JButton();
        cbbReportSearch = new javax.swing.JComboBox();
        btnReportSearch = new javax.swing.JButton();
        txtReportSearch = new javax.swing.JTextField();
        btnReportStatistic = new javax.swing.JButton();
        pnlTest = new javax.swing.JPanel();
        pnlTestMain = new javax.swing.JPanel();
        pnlTeatStatic = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        tbTest = new javax.swing.JTable();
        pnlTestTotal = new javax.swing.JPanel();
        lblTestTotal = new javax.swing.JLabel();
        pnlTestBar = new javax.swing.JPanel();
        btnTestAdd = new javax.swing.JButton();
        btnTestEdit = new javax.swing.JButton();
        btnTestDelete = new javax.swing.JButton();
        cbbTestSearch = new javax.swing.JComboBox();
        btnTestSearch = new javax.swing.JButton();
        txtTestSearch = new javax.swing.JTextField();
        pnlStock = new javax.swing.JPanel();
        pnlStockMain = new javax.swing.JPanel();
        pnlStockStatic = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        tbStock = new javax.swing.JTable();
        pnlStockTotal = new javax.swing.JPanel();
        lblStockTotal = new javax.swing.JLabel();
        pnlStockBar = new javax.swing.JPanel();
        btnStockAdd = new javax.swing.JButton();
        btnStockEdit = new javax.swing.JButton();
        btnStockDelete = new javax.swing.JButton();
        cbbStockSearch = new javax.swing.JComboBox();
        btnStockSearch = new javax.swing.JButton();
        txtStockSearch = new javax.swing.JTextField();
        pnlTechSkill = new javax.swing.JPanel();
        pnlTechSkillMain = new javax.swing.JPanel();
        pnlTechSkillStatic = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        tbTechSkill = new javax.swing.JTable();
        pnlTechSkilltotal = new javax.swing.JPanel();
        lblTechSkilltotal = new javax.swing.JLabel();
        pnlTechSkillBar = new javax.swing.JPanel();
        btnTechSkillAdd = new javax.swing.JButton();
        btnTechSkillEdit = new javax.swing.JButton();
        btnTechSkillDelete = new javax.swing.JButton();
        cbbTechSkillSearch = new javax.swing.JComboBox();
        btnTechSkillSearch = new javax.swing.JButton();
        txtTechSkillSearch = new javax.swing.JTextField();
        pnlSpecialization = new javax.swing.JPanel();
        pnlSpecializationMain = new javax.swing.JPanel();
        pnlSpecializationStatic = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        tbSpecialization = new javax.swing.JTable();
        pnlSpecializationTotal = new javax.swing.JPanel();
        lblSpecializationTotal = new javax.swing.JLabel();
        pnlSpecializationBar = new javax.swing.JPanel();
        btnSpecializationAdd = new javax.swing.JButton();
        btnSpecializationEdit = new javax.swing.JButton();
        btnSpecializationDelete = new javax.swing.JButton();
        cbbSpecializationSearch = new javax.swing.JComboBox();
        btnSpecializationSearch = new javax.swing.JButton();
        txtSpecializationSearch = new javax.swing.JTextField();
        mnuBar = new javax.swing.JMenuBar();
        mnuUser = new javax.swing.JMenu();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenuItem12 = new javax.swing.JMenuItem();
        mnuAdmin = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        mnuManage = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        mnuHelp = new javax.swing.JMenu();
        jMenuItem9 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("PikaLife - Pathology Lab Management System");
        setBackground(new java.awt.Color(223, 223, 223));
        setMinimumSize(new java.awt.Dimension(800, 650));
        getContentPane().setLayout(new java.awt.CardLayout());

        pnlLogin.setMinimumSize(new java.awt.Dimension(800, 600));
        pnlLogin.setLayout(new java.awt.BorderLayout());

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel3.setPreferredSize(new java.awt.Dimension(350, 255));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 16));
        jLabel2.setText("Login");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("Username:");

        txtUserName.setFont(new java.awt.Font("Tahoma", 0, 15));

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel4.setText("Password:");

        pssPassWord.setFont(new java.awt.Font("Tahoma", 0, 15));
        pssPassWord.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pssPassWordActionPerformed(evt);
            }
        });

        btnLogin.setText("Login");
        btnLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoginActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(txtUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)
                    .addComponent(pssPassWord, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)
                    .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pssPassWord, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        jPanel1.add(jPanel3);

        pnlLogin.add(jPanel1, java.awt.BorderLayout.CENTER);

        jPanel2.setPreferredSize(new java.awt.Dimension(800, 200));
        jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 100));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel1.setForeground(new java.awt.Color(102, 102, 102));
        jLabel1.setText("PikaLife - Pathology Lab Management System");
        jPanel2.add(jLabel1);

        pnlLogin.add(jPanel2, java.awt.BorderLayout.PAGE_START);

        getContentPane().add(pnlLogin, "card2");

        pnlMain.setBackground(new java.awt.Color(223, 223, 223));
        pnlMain.setLayout(new java.awt.CardLayout());

        pnlPatientList.setLayout(new java.awt.BorderLayout());

        pnlPatientListMain.setLayout(new java.awt.BorderLayout());

        pnlPatientStatic.setLayout(new java.awt.BorderLayout());

        tbPatientList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbPatientList.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbPatientList.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbPatientListMouseClicked(evt);
            }
        });
        tbPatientList.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbPatientListPropertyChange(evt);
            }
        });
        jScrollPane2.setViewportView(tbPatientList);

        pnlPatientStatic.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        pnlPatientTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlPatientTotal.setPreferredSize(new java.awt.Dimension(529, 25));
        pnlPatientTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblPatientTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblPatientTotal.setText("Total Patient: 0");
        pnlPatientTotal.add(lblPatientTotal);

        pnlPatientStatic.add(pnlPatientTotal, java.awt.BorderLayout.PAGE_START);

        pnlPatientListMain.add(pnlPatientStatic, java.awt.BorderLayout.CENTER);

        pnlPatientList.add(pnlPatientListMain, java.awt.BorderLayout.CENTER);

        pnlPatientListBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlPatientListBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlPatientListBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlPatientListBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlPatientListBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnPatientAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnPatientAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnPatientAdd.setToolTipText("Add");
        btnPatientAdd.setBorder(null);
        btnPatientAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnPatientAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatientAddActionPerformed(evt);
            }
        });

        btnPatientEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnPatientEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnPatientEdit.setToolTipText("Edit");
        btnPatientEdit.setBorder(null);
        btnPatientEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnPatientEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatientEditActionPerformed(evt);
            }
        });

        btnPatientDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnPatientDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnPatientDelete.setToolTipText("Delete");
        btnPatientDelete.setBorder(null);
        btnPatientDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnPatientDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatientDeleteActionPerformed(evt);
            }
        });

        cbbPatientSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbPatientSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Patient", "ID", "Full Name" }));
        cbbPatientSearch.setToolTipText("Search by...");
        cbbPatientSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbPatientSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbPatientSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbPatientSearchItemStateChanged(evt);
            }
        });

        btnPatientSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnPatientSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnPatientSearch.setToolTipText("Search");
        btnPatientSearch.setBorder(null);
        btnPatientSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnPatientSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatientSearchActionPerformed(evt);
            }
        });

        txtPatientSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtPatientSearchActionPerformed(evt);
            }
        });

        btnPatientStatistic.setBackground(new java.awt.Color(223, 223, 223));
        btnPatientStatistic.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Static.png"))); // NOI18N
        btnPatientStatistic.setToolTipText("Statistic");
        btnPatientStatistic.setBorder(null);
        btnPatientStatistic.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnPatientStatistic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatientStatisticActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlPatientListBarLayout = new javax.swing.GroupLayout(pnlPatientListBar);
        pnlPatientListBar.setLayout(pnlPatientListBarLayout);
        pnlPatientListBarLayout.setHorizontalGroup(
            pnlPatientListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPatientListBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnPatientAdd)
                .addGap(18, 18, 18)
                .addComponent(btnPatientEdit)
                .addGap(18, 18, 18)
                .addComponent(btnPatientDelete)
                .addGap(18, 18, 18)
                .addComponent(btnPatientStatistic)
                .addGap(18, 18, 18)
                .addComponent(cbbPatientSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtPatientSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnPatientSearch)
                .addContainerGap())
        );
        pnlPatientListBarLayout.setVerticalGroup(
            pnlPatientListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPatientListBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlPatientListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnPatientStatistic)
                    .addComponent(btnPatientSearch)
                    .addComponent(btnPatientDelete)
                    .addComponent(btnPatientEdit)
                    .addComponent(btnPatientAdd)
                    .addGroup(pnlPatientListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtPatientSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPatientSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlPatientList.add(pnlPatientListBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlPatientList, "cardPatient");

        pnlStaffList.setLayout(new java.awt.BorderLayout());

        pnlStaffListBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlStaffListBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlStaffListBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlStaffListBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlStaffListBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnStaffAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnStaffAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnStaffAdd.setToolTipText("Add");
        btnStaffAdd.setBorder(null);
        btnStaffAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStaffAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStaffAddActionPerformed(evt);
            }
        });

        btnStaffEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnStaffEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnStaffEdit.setToolTipText("Edit");
        btnStaffEdit.setBorder(null);
        btnStaffEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStaffEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStaffEditActionPerformed(evt);
            }
        });

        btnStaffDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnStaffDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnStaffDelete.setToolTipText("Delete");
        btnStaffDelete.setBorder(null);
        btnStaffDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStaffDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStaffDeleteActionPerformed(evt);
            }
        });

        cbbStaffSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbStaffSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Staff", "ID", "Full Name", "Department", "Tech Skill", "Specialization" }));
        cbbStaffSearch.setToolTipText("Search by...");
        cbbStaffSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbStaffSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbStaffSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbStaffSearchItemStateChanged(evt);
            }
        });

        btnStaffSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnStaffSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnStaffSearch.setToolTipText("Search");
        btnStaffSearch.setBorder(null);
        btnStaffSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStaffSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStaffSearchActionPerformed(evt);
            }
        });

        txtStaffSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtStaffSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlStaffListBarLayout = new javax.swing.GroupLayout(pnlStaffListBar);
        pnlStaffListBar.setLayout(pnlStaffListBarLayout);
        pnlStaffListBarLayout.setHorizontalGroup(
            pnlStaffListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStaffListBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnStaffAdd)
                .addGap(18, 18, 18)
                .addComponent(btnStaffEdit)
                .addGap(18, 18, 18)
                .addComponent(btnStaffDelete)
                .addGap(18, 18, 18)
                .addComponent(cbbStaffSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtStaffSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnStaffSearch)
                .addContainerGap())
        );
        pnlStaffListBarLayout.setVerticalGroup(
            pnlStaffListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStaffListBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlStaffListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnStaffSearch)
                    .addComponent(btnStaffDelete)
                    .addComponent(btnStaffEdit)
                    .addComponent(btnStaffAdd)
                    .addGroup(pnlStaffListBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbStaffSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtStaffSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlStaffList.add(pnlStaffListBar, java.awt.BorderLayout.NORTH);

        pnlStaffListMain.setPreferredSize(new java.awt.Dimension(529, 700));
        pnlStaffListMain.setLayout(new java.awt.BorderLayout());

        pnlStaffStatistic.setPreferredSize(new java.awt.Dimension(529, 650));
        pnlStaffStatistic.setLayout(new java.awt.BorderLayout());

        tbStaffList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbStaffList.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbStaffList.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbStaffListPropertyChange(evt);
            }
        });
        jScrollPane1.setViewportView(tbStaffList);

        pnlStaffStatistic.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        pnlStaffTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlStaffTotal.setPreferredSize(new java.awt.Dimension(529, 25));
        pnlStaffTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblStaffTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblStaffTotal.setText("Total Staff: 0");
        pnlStaffTotal.add(lblStaffTotal);

        pnlStaffStatistic.add(pnlStaffTotal, java.awt.BorderLayout.PAGE_START);

        pnlStaffListMain.add(pnlStaffStatistic, java.awt.BorderLayout.CENTER);

        pnlStaffList.add(pnlStaffListMain, java.awt.BorderLayout.CENTER);

        pnlMain.add(pnlStaffList, "cardStaff");

        pnlBilling.setLayout(new java.awt.BorderLayout());

        pnlBillingMain.setLayout(new java.awt.BorderLayout());

        pnlBillingTable.setLayout(new java.awt.BorderLayout());

        pnlBillingList.setLayout(new java.awt.BorderLayout());

        pnlPurchase.setMinimumSize(new java.awt.Dimension(0, 25));
        pnlPurchase.setPreferredSize(new java.awt.Dimension(505, 200));
        pnlPurchase.setLayout(new javax.swing.BoxLayout(pnlPurchase, javax.swing.BoxLayout.LINE_AXIS));

        pnlTestPurchase.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlTestPurchase.setPreferredSize(new java.awt.Dimension(250, 250));
        pnlTestPurchase.setLayout(new java.awt.BorderLayout());

        tbTestPurchase.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbTestPurchase.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbTestPurchase.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbTestPurchasePropertyChange(evt);
            }
        });
        jScrollPane7.setViewportView(tbTestPurchase);

        pnlTestPurchase.add(jScrollPane7, java.awt.BorderLayout.CENTER);

        pnlTestPurchaseTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlTestPurchaseTotal.setPreferredSize(new java.awt.Dimension(740, 25));
        pnlTestPurchaseTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblTestPurchaseTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblTestPurchaseTotal.setText("Total Test Purchase: 0");
        pnlTestPurchaseTotal.add(lblTestPurchaseTotal);

        pnlTestPurchase.add(pnlTestPurchaseTotal, java.awt.BorderLayout.PAGE_START);

        pnlPurchase.add(pnlTestPurchase);

        pnlStockPurcahse.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlStockPurcahse.setPreferredSize(new java.awt.Dimension(250, 250));
        pnlStockPurcahse.setLayout(new java.awt.BorderLayout());

        tbStockPurchase.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbStockPurchase.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbStockPurchase.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbStockPurchasePropertyChange(evt);
            }
        });
        jst2.setViewportView(tbStockPurchase);

        pnlStockPurcahse.add(jst2, java.awt.BorderLayout.CENTER);

        pnlStockPurchaseTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlStockPurchaseTotal.setPreferredSize(new java.awt.Dimension(740, 25));
        pnlStockPurchaseTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblStockPurchaseTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblStockPurchaseTotal.setText("Total Stock Purchase: 0");
        pnlStockPurchaseTotal.add(lblStockPurchaseTotal);

        pnlStockPurcahse.add(pnlStockPurchaseTotal, java.awt.BorderLayout.PAGE_START);

        pnlPurchase.add(pnlStockPurcahse);

        pnlBillingList.add(pnlPurchase, java.awt.BorderLayout.SOUTH);

        pnlBill.setMinimumSize(new java.awt.Dimension(75, 25));
        pnlBill.setPreferredSize(new java.awt.Dimension(505, 200));
        pnlBill.setLayout(new java.awt.BorderLayout());

        tbBilling.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbBilling.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbBilling.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbBillingMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                tbBillingMousePressed(evt);
            }
        });
        tbBilling.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbBillingPropertyChange(evt);
            }
        });
        tbBilling.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tbBillingKeyReleased(evt);
            }
        });
        jScrollPane3.setViewportView(tbBilling);

        pnlBill.add(jScrollPane3, java.awt.BorderLayout.CENTER);

        pnlBillTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlBillTotal.setPreferredSize(new java.awt.Dimension(424, 25));
        pnlBillTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblBillTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblBillTotal.setText("Total Bill: 0");
        pnlBillTotal.add(lblBillTotal);

        pnlBill.add(pnlBillTotal, java.awt.BorderLayout.PAGE_START);

        pnlBillTotalMoney.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlBillTotalMoney.setPreferredSize(new java.awt.Dimension(424, 25));
        pnlBillTotalMoney.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        lblTotalMoney.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblTotalMoney.setText("Total Amount: 0");
        pnlBillTotalMoney.add(lblTotalMoney);

        pnlBill.add(pnlBillTotalMoney, java.awt.BorderLayout.SOUTH);

        pnlBillingList.add(pnlBill, java.awt.BorderLayout.CENTER);

        pnlBillingTable.add(pnlBillingList, java.awt.BorderLayout.CENTER);

        pnlBillingPatient.setPreferredSize(new java.awt.Dimension(452, 125));
        pnlBillingPatient.setLayout(new java.awt.BorderLayout());

        pnlBillingPatientTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlBillingPatientTotal.setPreferredSize(new java.awt.Dimension(424, 25));
        pnlBillingPatientTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblBillingPatientTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblBillingPatientTotal.setText("Total Patient: 0");
        pnlBillingPatientTotal.add(lblBillingPatientTotal);

        pnlBillingPatient.add(pnlBillingPatientTotal, java.awt.BorderLayout.PAGE_START);

        tbPatientListInBill.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbPatientListInBill.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbPatientListInBill.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbPatientListInBillPropertyChange1(evt);
            }
        });
        jScrollPane11.setViewportView(tbPatientListInBill);

        pnlBillingPatient.add(jScrollPane11, java.awt.BorderLayout.CENTER);

        pnlBillingTable.add(pnlBillingPatient, java.awt.BorderLayout.SOUTH);

        pnlBillingMain.add(pnlBillingTable, java.awt.BorderLayout.CENTER);

        pnlBilling.add(pnlBillingMain, java.awt.BorderLayout.CENTER);

        pnlBillingBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlBillingBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlBillingBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlBillingBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlBillingBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnBillingAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnBillingAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnBillingAdd.setToolTipText("Add");
        btnBillingAdd.setBorder(null);
        btnBillingAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnBillingAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillingAddActionPerformed(evt);
            }
        });

        btnBillingEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnBillingEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnBillingEdit.setToolTipText("Edit");
        btnBillingEdit.setBorder(null);
        btnBillingEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnBillingEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillingEditActionPerformed(evt);
            }
        });

        btnBillingDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnBillingDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnBillingDelete.setToolTipText("Delete");
        btnBillingDelete.setBorder(null);
        btnBillingDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnBillingDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillingDeleteActionPerformed(evt);
            }
        });

        cbbBillingSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbBillingSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Bill", "Bill's ID", "Patient's ID", "Patient's Name", "Paid/Not Paid", "More..." }));
        cbbBillingSearch.setToolTipText("Search by...");
        cbbBillingSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbBillingSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbBillingSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbBillingSearchItemStateChanged(evt);
            }
        });

        btnBillingSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnBillingSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnBillingSearch.setToolTipText("Search");
        btnBillingSearch.setBorder(null);
        btnBillingSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnBillingSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillingSearchActionPerformed(evt);
            }
        });

        txtBillingSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtBillingSearchActionPerformed(evt);
            }
        });

        btnBillingStatistic.setBackground(new java.awt.Color(223, 223, 223));
        btnBillingStatistic.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Static.png"))); // NOI18N
        btnBillingStatistic.setToolTipText("Statistic");
        btnBillingStatistic.setBorder(null);
        btnBillingStatistic.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnBillingStatistic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillingStatisticActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBillingBarLayout = new javax.swing.GroupLayout(pnlBillingBar);
        pnlBillingBar.setLayout(pnlBillingBarLayout);
        pnlBillingBarLayout.setHorizontalGroup(
            pnlBillingBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBillingBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnBillingAdd)
                .addGap(18, 18, 18)
                .addComponent(btnBillingEdit)
                .addGap(18, 18, 18)
                .addComponent(btnBillingDelete)
                .addGap(18, 18, 18)
                .addComponent(btnBillingStatistic)
                .addGap(18, 18, 18)
                .addComponent(cbbBillingSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtBillingSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBillingSearch)
                .addContainerGap())
        );
        pnlBillingBarLayout.setVerticalGroup(
            pnlBillingBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBillingBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlBillingBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnBillingStatistic)
                    .addComponent(btnBillingSearch)
                    .addComponent(btnBillingDelete)
                    .addComponent(btnBillingEdit)
                    .addComponent(btnBillingAdd)
                    .addGroup(pnlBillingBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtBillingSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbBillingSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlBilling.add(pnlBillingBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlBilling, "cardBilling");

        pnlReport.setLayout(new java.awt.BorderLayout());

        pnlReportMain.setLayout(new java.awt.BorderLayout());

        pnlReportStatic.setLayout(new java.awt.BorderLayout());

        tbReport.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbReport.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbReport.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbReportMouseClicked(evt);
            }
        });
        tbReport.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbReportPropertyChange(evt);
            }
        });
        jScrollPane4.setViewportView(tbReport);

        pnlReportStatic.add(jScrollPane4, java.awt.BorderLayout.CENTER);

        pnlReportTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlReportTotal.setPreferredSize(new java.awt.Dimension(740, 25));
        pnlReportTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblReportTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblReportTotal.setText("Total Report: 0");
        pnlReportTotal.add(lblReportTotal);

        pnlReportStatic.add(pnlReportTotal, java.awt.BorderLayout.PAGE_START);

        pnlReportMain.add(pnlReportStatic, java.awt.BorderLayout.CENTER);

        pnlReport.add(pnlReportMain, java.awt.BorderLayout.CENTER);

        pnlReportBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlReportBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlReportBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlReportBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlReportBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnReportAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnReportAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnReportAdd.setToolTipText("Add");
        btnReportAdd.setBorder(null);
        btnReportAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnReportAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportAddActionPerformed(evt);
            }
        });

        btnReportEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnReportEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnReportEdit.setToolTipText("Edit");
        btnReportEdit.setBorder(null);
        btnReportEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnReportEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportEditActionPerformed(evt);
            }
        });

        btnReportDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnReportDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnReportDelete.setToolTipText("Delete");
        btnReportDelete.setBorder(null);
        btnReportDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnReportDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportDeleteActionPerformed(evt);
            }
        });

        cbbReportSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbReportSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Report", "Report's ID", "Test Purchase ID", "Test", "Patient's ID", "Patient's Name", "Doctor's ID", "Doctor's Name", "More..." }));
        cbbReportSearch.setToolTipText("Search by...");
        cbbReportSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbReportSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbReportSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbReportSearchItemStateChanged(evt);
            }
        });

        btnReportSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnReportSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnReportSearch.setToolTipText("Search");
        btnReportSearch.setBorder(null);
        btnReportSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnReportSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportSearchActionPerformed(evt);
            }
        });

        txtReportSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtReportSearchActionPerformed(evt);
            }
        });

        btnReportStatistic.setBackground(new java.awt.Color(223, 223, 223));
        btnReportStatistic.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Static.png"))); // NOI18N
        btnReportStatistic.setToolTipText("Statistic");
        btnReportStatistic.setBorder(null);
        btnReportStatistic.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnReportStatistic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReportStatisticActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlReportBarLayout = new javax.swing.GroupLayout(pnlReportBar);
        pnlReportBar.setLayout(pnlReportBarLayout);
        pnlReportBarLayout.setHorizontalGroup(
            pnlReportBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlReportBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnReportAdd)
                .addGap(18, 18, 18)
                .addComponent(btnReportEdit)
                .addGap(18, 18, 18)
                .addComponent(btnReportDelete)
                .addGap(18, 18, 18)
                .addComponent(btnReportStatistic)
                .addGap(18, 18, 18)
                .addComponent(cbbReportSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtReportSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnReportSearch)
                .addContainerGap())
        );
        pnlReportBarLayout.setVerticalGroup(
            pnlReportBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlReportBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlReportBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnReportStatistic)
                    .addComponent(btnReportSearch)
                    .addComponent(btnReportDelete)
                    .addComponent(btnReportEdit)
                    .addComponent(btnReportAdd)
                    .addGroup(pnlReportBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtReportSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbReportSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlReport.add(pnlReportBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlReport, "cardReport");

        pnlTest.setLayout(new java.awt.BorderLayout());

        pnlTestMain.setLayout(new java.awt.BorderLayout());

        pnlTeatStatic.setLayout(new java.awt.BorderLayout());

        tbTest.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbTest.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbTest.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbTestPropertyChange(evt);
            }
        });
        jScrollPane5.setViewportView(tbTest);

        pnlTeatStatic.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        pnlTestTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlTestTotal.setPreferredSize(new java.awt.Dimension(765, 25));
        pnlTestTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblTestTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblTestTotal.setText("Total Test: 0");
        pnlTestTotal.add(lblTestTotal);

        pnlTeatStatic.add(pnlTestTotal, java.awt.BorderLayout.PAGE_START);

        pnlTestMain.add(pnlTeatStatic, java.awt.BorderLayout.CENTER);

        pnlTest.add(pnlTestMain, java.awt.BorderLayout.CENTER);

        pnlTestBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlTestBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlTestBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlTestBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlTestBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnTestAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnTestAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnTestAdd.setToolTipText("Add");
        btnTestAdd.setBorder(null);
        btnTestAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTestAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTestAddActionPerformed(evt);
            }
        });

        btnTestEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnTestEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnTestEdit.setToolTipText("Edit");
        btnTestEdit.setBorder(null);
        btnTestEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTestEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTestEditActionPerformed(evt);
            }
        });

        btnTestDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnTestDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnTestDelete.setToolTipText("Delete");
        btnTestDelete.setBorder(null);
        btnTestDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTestDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTestDeleteActionPerformed(evt);
            }
        });

        cbbTestSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbTestSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Test", "ID", "Name", "Cost" }));
        cbbTestSearch.setToolTipText("Search by...");
        cbbTestSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbTestSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbTestSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbTestSearchItemStateChanged(evt);
            }
        });

        btnTestSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnTestSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnTestSearch.setToolTipText("Search");
        btnTestSearch.setBorder(null);
        btnTestSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTestSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTestSearchActionPerformed(evt);
            }
        });

        txtTestSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTestSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlTestBarLayout = new javax.swing.GroupLayout(pnlTestBar);
        pnlTestBar.setLayout(pnlTestBarLayout);
        pnlTestBarLayout.setHorizontalGroup(
            pnlTestBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTestBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnTestAdd)
                .addGap(18, 18, 18)
                .addComponent(btnTestEdit)
                .addGap(18, 18, 18)
                .addComponent(btnTestDelete)
                .addGap(18, 18, 18)
                .addComponent(cbbTestSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtTestSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnTestSearch)
                .addContainerGap())
        );
        pnlTestBarLayout.setVerticalGroup(
            pnlTestBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTestBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlTestBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTestSearch)
                    .addComponent(btnTestDelete)
                    .addComponent(btnTestEdit)
                    .addComponent(btnTestAdd)
                    .addGroup(pnlTestBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbTestSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtTestSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlTest.add(pnlTestBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlTest, "cardTest");

        pnlStock.setLayout(new java.awt.BorderLayout());

        pnlStockMain.setLayout(new java.awt.BorderLayout());

        pnlStockStatic.setLayout(new java.awt.BorderLayout());

        tbStock.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbStock.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbStock.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbStockPropertyChange(evt);
            }
        });
        jScrollPane6.setViewportView(tbStock);

        pnlStockStatic.add(jScrollPane6, java.awt.BorderLayout.CENTER);

        pnlStockTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlStockTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblStockTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblStockTotal.setText("Total Stock: 0");
        pnlStockTotal.add(lblStockTotal);

        pnlStockStatic.add(pnlStockTotal, java.awt.BorderLayout.PAGE_START);

        pnlStockMain.add(pnlStockStatic, java.awt.BorderLayout.CENTER);

        pnlStock.add(pnlStockMain, java.awt.BorderLayout.CENTER);

        pnlStockBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlStockBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlStockBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlStockBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlStockBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnStockAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnStockAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnStockAdd.setToolTipText("Add");
        btnStockAdd.setBorder(null);
        btnStockAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStockAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStockAddActionPerformed(evt);
            }
        });

        btnStockEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnStockEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnStockEdit.setToolTipText("Edit");
        btnStockEdit.setBorder(null);
        btnStockEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStockEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStockEditActionPerformed(evt);
            }
        });

        btnStockDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnStockDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnStockDelete.setToolTipText("Delete");
        btnStockDelete.setBorder(null);
        btnStockDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStockDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStockDeleteActionPerformed(evt);
            }
        });

        cbbStockSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbStockSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Stock", "ID", "Name", "More...." }));
        cbbStockSearch.setToolTipText("Search by...");
        cbbStockSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbStockSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbStockSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbStockSearchItemStateChanged(evt);
            }
        });

        btnStockSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnStockSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnStockSearch.setToolTipText("Search");
        btnStockSearch.setBorder(null);
        btnStockSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnStockSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStockSearchActionPerformed(evt);
            }
        });

        txtStockSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtStockSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlStockBarLayout = new javax.swing.GroupLayout(pnlStockBar);
        pnlStockBar.setLayout(pnlStockBarLayout);
        pnlStockBarLayout.setHorizontalGroup(
            pnlStockBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStockBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnStockAdd)
                .addGap(18, 18, 18)
                .addComponent(btnStockEdit)
                .addGap(18, 18, 18)
                .addComponent(btnStockDelete)
                .addGap(18, 18, 18)
                .addComponent(cbbStockSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtStockSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnStockSearch)
                .addContainerGap())
        );
        pnlStockBarLayout.setVerticalGroup(
            pnlStockBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStockBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlStockBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnStockSearch)
                    .addComponent(btnStockDelete)
                    .addComponent(btnStockEdit)
                    .addComponent(btnStockAdd)
                    .addGroup(pnlStockBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbStockSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtStockSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlStock.add(pnlStockBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlStock, "cardStock");

        pnlTechSkill.setLayout(new java.awt.BorderLayout());

        pnlTechSkillMain.setLayout(new java.awt.BorderLayout());

        pnlTechSkillStatic.setLayout(new java.awt.BorderLayout());

        tbTechSkill.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbTechSkill.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbTechSkill.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbTechSkillPropertyChange(evt);
            }
        });
        jScrollPane8.setViewportView(tbTechSkill);

        pnlTechSkillStatic.add(jScrollPane8, java.awt.BorderLayout.CENTER);

        pnlTechSkilltotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlTechSkilltotal.setPreferredSize(new java.awt.Dimension(765, 25));
        pnlTechSkilltotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblTechSkilltotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblTechSkilltotal.setText("Total Tech Skill: 0");
        pnlTechSkilltotal.add(lblTechSkilltotal);

        pnlTechSkillStatic.add(pnlTechSkilltotal, java.awt.BorderLayout.PAGE_START);

        pnlTechSkillMain.add(pnlTechSkillStatic, java.awt.BorderLayout.CENTER);

        pnlTechSkill.add(pnlTechSkillMain, java.awt.BorderLayout.CENTER);

        pnlTechSkillBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlTechSkillBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlTechSkillBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlTechSkillBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlTechSkillBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnTechSkillAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnTechSkillAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnTechSkillAdd.setToolTipText("Add");
        btnTechSkillAdd.setBorder(null);
        btnTechSkillAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTechSkillAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTechSkillAddActionPerformed(evt);
            }
        });

        btnTechSkillEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnTechSkillEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnTechSkillEdit.setToolTipText("Edit");
        btnTechSkillEdit.setBorder(null);
        btnTechSkillEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTechSkillEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTechSkillEditActionPerformed(evt);
            }
        });

        btnTechSkillDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnTechSkillDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnTechSkillDelete.setToolTipText("Delete");
        btnTechSkillDelete.setBorder(null);
        btnTechSkillDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTechSkillDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTechSkillDeleteActionPerformed(evt);
            }
        });

        cbbTechSkillSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbTechSkillSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Tech Skill", "ID", "Name" }));
        cbbTechSkillSearch.setToolTipText("Search by...");
        cbbTechSkillSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbTechSkillSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbTechSkillSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbTechSkillSearchItemStateChanged(evt);
            }
        });

        btnTechSkillSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnTechSkillSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnTechSkillSearch.setToolTipText("Search");
        btnTechSkillSearch.setBorder(null);
        btnTechSkillSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnTechSkillSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTechSkillSearchActionPerformed(evt);
            }
        });

        txtTechSkillSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTechSkillSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlTechSkillBarLayout = new javax.swing.GroupLayout(pnlTechSkillBar);
        pnlTechSkillBar.setLayout(pnlTechSkillBarLayout);
        pnlTechSkillBarLayout.setHorizontalGroup(
            pnlTechSkillBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTechSkillBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnTechSkillAdd)
                .addGap(18, 18, 18)
                .addComponent(btnTechSkillEdit)
                .addGap(18, 18, 18)
                .addComponent(btnTechSkillDelete)
                .addGap(18, 18, 18)
                .addComponent(cbbTechSkillSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtTechSkillSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnTechSkillSearch)
                .addContainerGap())
        );
        pnlTechSkillBarLayout.setVerticalGroup(
            pnlTechSkillBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTechSkillBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlTechSkillBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTechSkillSearch)
                    .addComponent(btnTechSkillDelete)
                    .addComponent(btnTechSkillEdit)
                    .addComponent(btnTechSkillAdd)
                    .addGroup(pnlTechSkillBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbTechSkillSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtTechSkillSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlTechSkill.add(pnlTechSkillBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlTechSkill, "cardTechSkill");

        pnlSpecialization.setLayout(new java.awt.BorderLayout());

        pnlSpecializationMain.setLayout(new java.awt.BorderLayout());

        pnlSpecializationStatic.setLayout(new java.awt.BorderLayout());

        tbSpecialization.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSpecialization.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbSpecialization.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                tbSpecializationPropertyChange(evt);
            }
        });
        jScrollPane9.setViewportView(tbSpecialization);

        pnlSpecializationStatic.add(jScrollPane9, java.awt.BorderLayout.CENTER);

        pnlSpecializationTotal.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlSpecializationTotal.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblSpecializationTotal.setFont(new java.awt.Font("Tahoma", 1, 11));
        lblSpecializationTotal.setText("Total Specialization: 0");
        pnlSpecializationTotal.add(lblSpecializationTotal);

        pnlSpecializationStatic.add(pnlSpecializationTotal, java.awt.BorderLayout.PAGE_START);

        pnlSpecializationMain.add(pnlSpecializationStatic, java.awt.BorderLayout.CENTER);

        pnlSpecialization.add(pnlSpecializationMain, java.awt.BorderLayout.CENTER);

        pnlSpecializationBar.setBackground(new java.awt.Color(223, 223, 223));
        pnlSpecializationBar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        pnlSpecializationBar.setMaximumSize(new java.awt.Dimension(32767, 35));
        pnlSpecializationBar.setMinimumSize(new java.awt.Dimension(0, 35));
        pnlSpecializationBar.setPreferredSize(new java.awt.Dimension(624, 35));

        btnSpecializationAdd.setBackground(new java.awt.Color(223, 223, 223));
        btnSpecializationAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Add.png"))); // NOI18N
        btnSpecializationAdd.setToolTipText("Add");
        btnSpecializationAdd.setBorder(null);
        btnSpecializationAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSpecializationAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSpecializationAddActionPerformed(evt);
            }
        });

        btnSpecializationEdit.setBackground(new java.awt.Color(223, 223, 223));
        btnSpecializationEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Edit.png"))); // NOI18N
        btnSpecializationEdit.setToolTipText("Edit");
        btnSpecializationEdit.setBorder(null);
        btnSpecializationEdit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSpecializationEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSpecializationEditActionPerformed(evt);
            }
        });

        btnSpecializationDelete.setBackground(new java.awt.Color(223, 223, 223));
        btnSpecializationDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Delete.png"))); // NOI18N
        btnSpecializationDelete.setToolTipText("Delete");
        btnSpecializationDelete.setBorder(null);
        btnSpecializationDelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSpecializationDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSpecializationDeleteActionPerformed(evt);
            }
        });

        cbbSpecializationSearch.setBackground(new java.awt.Color(250, 250, 250));
        cbbSpecializationSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---Search by---", "All Specialization", "ID", "Name" }));
        cbbSpecializationSearch.setToolTipText("Search by...");
        cbbSpecializationSearch.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                cbbSpecializationSearchPopupMenuWillBecomeVisible(evt);
            }
        });
        cbbSpecializationSearch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbSpecializationSearchItemStateChanged(evt);
            }
        });

        btnSpecializationSearch.setBackground(new java.awt.Color(223, 223, 223));
        btnSpecializationSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Search.png"))); // NOI18N
        btnSpecializationSearch.setToolTipText("Search");
        btnSpecializationSearch.setBorder(null);
        btnSpecializationSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSpecializationSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSpecializationSearchActionPerformed(evt);
            }
        });

        txtSpecializationSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSpecializationSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlSpecializationBarLayout = new javax.swing.GroupLayout(pnlSpecializationBar);
        pnlSpecializationBar.setLayout(pnlSpecializationBarLayout);
        pnlSpecializationBarLayout.setHorizontalGroup(
            pnlSpecializationBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSpecializationBarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnSpecializationAdd)
                .addGap(18, 18, 18)
                .addComponent(btnSpecializationEdit)
                .addGap(18, 18, 18)
                .addComponent(btnSpecializationDelete)
                .addGap(18, 18, 18)
                .addComponent(cbbSpecializationSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtSpecializationSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSpecializationSearch)
                .addContainerGap())
        );
        pnlSpecializationBarLayout.setVerticalGroup(
            pnlSpecializationBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSpecializationBarLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(pnlSpecializationBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSpecializationSearch)
                    .addComponent(btnSpecializationDelete)
                    .addComponent(btnSpecializationEdit)
                    .addComponent(btnSpecializationAdd)
                    .addGroup(pnlSpecializationBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbSpecializationSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtSpecializationSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlSpecialization.add(pnlSpecializationBar, java.awt.BorderLayout.NORTH);

        pnlMain.add(pnlSpecialization, "cardSpecialization");

        getContentPane().add(pnlMain, "card3");

        mnuUser.setMnemonic('u');
        mnuUser.setText("User");
        mnuUser.setEnabled(false);

        jMenuItem10.setMnemonic('c');
        jMenuItem10.setText("Change Password");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        mnuUser.add(jMenuItem10);

        jMenuItem11.setText("Log out");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        mnuUser.add(jMenuItem11);

        jMenuItem12.setMnemonic('x');
        jMenuItem12.setText("Exit");
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        mnuUser.add(jMenuItem12);

        mnuBar.add(mnuUser);

        mnuAdmin.setMnemonic('R');
        mnuAdmin.setText("Administrative");
        mnuAdmin.setToolTipText("");
        mnuAdmin.setEnabled(false);

        jMenuItem4.setMnemonic('P');
        jMenuItem4.setText("Patient List");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed1(evt);
            }
        });
        mnuAdmin.add(jMenuItem4);

        jMenuItem5.setMnemonic('B');
        jMenuItem5.setText("Billing");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed1(evt);
            }
        });
        mnuAdmin.add(jMenuItem5);

        jMenuItem6.setMnemonic('R');
        jMenuItem6.setText("Report");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        mnuAdmin.add(jMenuItem6);

        mnuBar.add(mnuAdmin);

        mnuManage.setMnemonic('S');
        mnuManage.setText("Managementc");
        mnuManage.setEnabled(false);

        jMenuItem1.setMnemonic('S');
        jMenuItem1.setText("Staff List");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        mnuManage.add(jMenuItem1);

        jMenuItem2.setMnemonic('e');
        jMenuItem2.setText("Tech Skill");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        mnuManage.add(jMenuItem2);

        jMenuItem3.setMnemonic('p');
        jMenuItem3.setText("Specialization");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        mnuManage.add(jMenuItem3);

        jMenuItem7.setMnemonic('T');
        jMenuItem7.setText("Test");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        mnuManage.add(jMenuItem7);

        jMenuItem8.setMnemonic('o');
        jMenuItem8.setText("Stock");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        mnuManage.add(jMenuItem8);

        mnuBar.add(mnuManage);

        mnuHelp.setMnemonic('H');
        mnuHelp.setText("Help");
        mnuHelp.setEnabled(false);

        jMenuItem9.setMnemonic('A');
        jMenuItem9.setText("About Us");
        mnuHelp.add(jMenuItem9);

        mnuBar.add(mnuHelp);

        setJMenuBar(mnuBar);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cbbStaffSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbStaffSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbStaffSearch.getSelectedItem().toString().equalsIgnoreCase("All Staff")) {

                PikaTableModel dt = db.displayStaff(con);

                tbStaffList.setModel(dt);
            } else if (cbbStaffSearch.getSelectedItem().toString().equalsIgnoreCase("Department")) {
                dlgListDepartment depart = new dlgListDepartment(this, true);

                depart.setLocationRelativeTo(this);
                depart.setVisible(true);
                txtStaffSearch.setText(depart.getDepartment());

                if (txtStaffSearch.getText().length() != 0) {
                    btnStaffSearch.doClick();
                }
            } else if (cbbStaffSearch.getSelectedItem().toString().equalsIgnoreCase("Tech Skill")) {
                dlgListTechSkill tech = new dlgListTechSkill(this, true);
                tech.setLocationRelativeTo(this);
                tech.setVisible(true);
                txtStaffSearch.setText(tech.getTechSkill());
                if (txtStaffSearch.getText().length() != 0) {
                    btnStaffSearch.doClick();
                }
            } else if (cbbStaffSearch.getSelectedItem().toString().equalsIgnoreCase("Specialization")) {
                dlgListSpecialization spec = new dlgListSpecialization(this, true);
                spec.setLocationRelativeTo(this);
                spec.setVisible(true);
                txtStaffSearch.setText(spec.getSpecialization());
                if (txtStaffSearch.getText().length() != 0) {
                    btnStaffSearch.doClick();
                }
            }
        }
    }//GEN-LAST:event_cbbStaffSearchItemStateChanged

    private void cbbPatientSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbPatientSearchItemStateChanged
        // TODO add your handling code here:  
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbPatientSearch.getSelectedItem().toString().equalsIgnoreCase("All Patient")) {

                PikaTableModel dt = db.displayPatient(con);

                tbPatientList.setModel(dt);
                tbPatientListInBill.setModel(dt);                
            }
        }
    }//GEN-LAST:event_cbbPatientSearchItemStateChanged

    private void cbbBillingSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbBillingSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbBillingSearch.getSelectedItem().toString().equalsIgnoreCase("All Bill")) {

                PikaTableModel dt = db.displayBill(con);

                tbBilling.setModel(dt);
            }else if(cbbBillingSearch.getSelectedItem().toString().equalsIgnoreCase("More...")){

                SearchBillingMore filter = new SearchBillingMore(this, true);
                filter.setLocationRelativeTo(this);
                filter.setVisible(true);

                if (filter.getList().size() > 0) {
                    PikaTableModel pika = db.searchBillingMore(con, filter.getList());
                    tbBilling.setModel(pika);

                    btnBillingSearch.doClick();

                }
            } else if (cbbBillingSearch.getSelectedItem().toString().equalsIgnoreCase("Paid/Not Paid")) {
                dlgChoosePaidOrNot choose = new dlgChoosePaidOrNot(this, true);
                choose.setLocationRelativeTo(this);
                choose.setVisible(true);
                             
                if (choose.getPaid() == 0 || choose.getPaid() == 1) {
                    txtBillingSearch.setText("" + choose.getPaid());
                    btnBillingSearch.doClick();
                }
            }
        }
    }//GEN-LAST:event_cbbBillingSearchItemStateChanged

    private void cbbReportSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbReportSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbReportSearch.getSelectedItem().toString().equalsIgnoreCase("All Report")) {

                PikaTableModel dt = db.displayReport(con);

                tbReport.setModel(dt);
            }else if(cbbReportSearch.getSelectedItem().toString().equalsIgnoreCase("More...")){

                SearchReportMore filter = new SearchReportMore(this, true);
                filter.setLocationRelativeTo(this);

                filter.setVisible(true);

                if (filter.getList().size() > 0) {
                    PikaTableModel pika = db.searchReportMore(con, filter.getList());
                    tbReport.setModel(pika);

                    btnReportSearch.doClick();

                }
            }else if(cbbReportSearch.getSelectedItem().toString().equalsIgnoreCase("Test")){

                dlgListTest test = new dlgListTest(this, true);
                test.setLocationRelativeTo(this);

                test.setVisible(true);

                txtReportSearch.setText(test.getTest());
                if (txtReportSearch.getText().length() != 0) {
                    btnReportSearch.doClick();
                }
            }
        }
    }//GEN-LAST:event_cbbReportSearchItemStateChanged

    private void cbbTestSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbTestSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbTestSearch.getSelectedItem().toString().equalsIgnoreCase("All Test")) {

                PikaTableModel dt = db.displayTest(con);

                tbTest.setModel(dt);
            }else if(cbbTestSearch.getSelectedItem().toString().equalsIgnoreCase("Cost")){

                dlgSearchTestByCost cost = new dlgSearchTestByCost(this, true);
                cost.setLocationRelativeTo(this);

                cost.setVisible(true);

                txtTestSearch.setText(cost.getSearch());

                if (txtTestSearch.getText().length() != 0) {
                    btnTestSearch.doClick();
                }
            }
        }
    }//GEN-LAST:event_cbbTestSearchItemStateChanged

    private void cbbStockSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbStockSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbStockSearch.getSelectedItem().toString().equalsIgnoreCase("All Stock")) {

                PikaTableModel dt = db.displayStock(con);

                tbStock.setModel(dt);
            }else if(cbbStockSearch.getSelectedItem().toString().equalsIgnoreCase("More....")){

                dlgFilterStock filter = new dlgFilterStock(this, true);
                filter.setLocationRelativeTo(this);

                filter.setVisible(true);

                if (filter.getList().size() > 0) {
                    PikaTableModel pika = db.searchStockMore(con, filter.getList());
                    tbStock.setModel(pika);
                }
            }
        }
    }//GEN-LAST:event_cbbStockSearchItemStateChanged

    private void cbbTechSkillSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbTechSkillSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbTechSkillSearch.getSelectedItem().toString().equalsIgnoreCase("All Tech Skill")) {

                PikaTableModel dt = db.displayTechSkill(con);

                tbTechSkill.setModel(dt);
            }
        }
    }//GEN-LAST:event_cbbTechSkillSearchItemStateChanged

    private void cbbSpecializationSearchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbSpecializationSearchItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
            if (cbbSpecializationSearch.getSelectedItem().toString().equalsIgnoreCase("All Specialization")) {

                PikaTableModel dt = db.displaySpecialization(con);

                tbSpecialization.setModel(dt);
            }
        }
    }//GEN-LAST:event_cbbSpecializationSearchItemStateChanged

    private void btnStaffSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStaffSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbStaffSearch.getSelectedItem().toString();

        PikaTableModel dt;        

        if(searchBy.equalsIgnoreCase("ID")){
            String text = txtStaffSearch.getText();
            dt = db.searchStaff(con, 1, text);
            tbStaffList.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Full Name")){
            String text = txtStaffSearch.getText();
            dt = db.searchStaff(con, 2, text);
            tbStaffList.setModel(dt);
            
        }else if(searchBy.equalsIgnoreCase("Department")){
            String text = txtStaffSearch.getText();
            dt = db.searchStaff(con, 3, text);
            tbStaffList.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Tech Skill")){
            String text = txtStaffSearch.getText();
            dt = db.searchStaff(con, 4, text);
            tbStaffList.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Specialization")){
            String text = txtStaffSearch.getText();
            dt = db.searchStaff(con, 5, text);
            tbStaffList.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
       
    }//GEN-LAST:event_btnStaffSearchActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardStaff");
}//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardTechSkill");
}//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardPatient");
}//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardBilling");
}//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardReport");
}//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardTest");
}//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardStock");
}//GEN-LAST:event_jMenuItem8ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardSpecialization");
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void txtStaffSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtStaffSearchActionPerformed
        // TODO add your handling code here:
        btnStaffSearch.doClick();
    }//GEN-LAST:event_txtStaffSearchActionPerformed

    private void btnPatientSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatientSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbPatientSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("ID")){
            try {
                String text = txtPatientSearch.getText();
                int number = Integer.parseInt(text);

                dt = db.searchPatient(con, 1, text);
                tbPatientList.setModel(dt);
                tbPatientListInBill.setModel(dt);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Id is number only!");
                return;
            }

        }else if(searchBy.equalsIgnoreCase("Full Name")){
            String text = txtPatientSearch.getText();
            dt = db.searchPatient(con, 2, text);
            tbPatientList.setModel(dt);
            tbPatientListInBill.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnPatientSearchActionPerformed

    private void txtPatientSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPatientSearchActionPerformed
        // TODO add your handling code here:
        btnPatientSearch.doClick();
    }//GEN-LAST:event_txtPatientSearchActionPerformed

    private void btnBillingSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillingSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbBillingSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("Bill's ID")){
            try {
                String text = txtBillingSearch.getText();
                int number = Integer.parseInt(text);
                
                dt = db.searchBilling(con, 1, text);
                tbBilling.setModel(dt);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Id is number only!");
                return;
            }
            
        }else if(searchBy.equalsIgnoreCase("Patient's ID")){
            try {
                String text = txtBillingSearch.getText();
                int number = Integer.parseInt(text);

                dt = db.searchBilling(con, 2, text);
                tbBilling.setModel(dt);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Id is number only!");
                return;
            }
            
        }else if(searchBy.equalsIgnoreCase("Patient's Name")){
            String text = txtBillingSearch.getText();
            dt = db.searchBilling(con, 3, text);
            tbBilling.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Paid/Not Paid")){
            String text = txtBillingSearch.getText();
            dt = db.searchBilling(con, 4, text);
            tbBilling.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Collector's ID")){
            String text = txtBillingSearch.getText();
            dt = db.searchBilling(con, 5, text);
            tbBilling.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnBillingSearchActionPerformed

    private void txtBillingSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtBillingSearchActionPerformed
        // TODO add your handling code here:
        btnBillingSearch.doClick();
    }//GEN-LAST:event_txtBillingSearchActionPerformed

    private void btnReportSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbReportSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("Report's ID")){
            try {
                String text = txtReportSearch.getText();
                int number = Integer.parseInt(text);

                dt = db.searchReport(con, 1, text);
                tbReport.setModel(dt);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Id is number only!");
                return;
            }
            
        }else if(searchBy.equalsIgnoreCase("Test")){
            String text = txtReportSearch.getText();
            dt = db.searchReport(con, 2, text);
            tbReport.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Patient's ID")){
            try {
                String text = txtReportSearch.getText();
                int number = Integer.parseInt(text);

                dt = db.searchReport(con, 3, text);
                tbReport.setModel(dt);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Id is number only!");
                return;
            }
            
        }else if(searchBy.equalsIgnoreCase("Patient's Name")){
            String text = txtReportSearch.getText();
            dt = db.searchReport(con, 4, text);
            tbReport.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Doctor's ID")){
            String text = txtReportSearch.getText();
            dt = db.searchReport(con, 5, text);
            tbReport.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Doctor's Name")){
            String text = txtReportSearch.getText();
            dt = db.searchReport(con, 6, text);
            tbReport.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Test Purchase ID")){
            String text = txtReportSearch.getText();
            dt = db.searchReport(con, 7, text);
            tbReport.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnReportSearchActionPerformed

    private void txtReportSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtReportSearchActionPerformed
        // TODO add your handling code here:
        btnReportSearch.doClick();
    }//GEN-LAST:event_txtReportSearchActionPerformed

    private void btnTestSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTestSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbTestSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("ID")){
            String text = txtTestSearch.getText();
            dt = db.searchTest(con, 1, text);
            tbTest.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Name")){
            String text = txtTestSearch.getText();
            dt = db.searchTest(con, 2, text);
            tbTest.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Cost")){
            String text = txtTestSearch.getText();
            dt = db.searchTest(con, 3, text);
            tbTest.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnTestSearchActionPerformed

    private void txtTestSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTestSearchActionPerformed
        // TODO add your handling code here:
        btnTestSearch.doClick();
    }//GEN-LAST:event_txtTestSearchActionPerformed

    private void btnStockSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStockSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbStockSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("ID")){
            String text = txtStockSearch.getText();
            dt = db.searchStock(con, 1, text);
            tbStock.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Name")){
            String text = txtStockSearch.getText();
            dt = db.searchStock(con, 2, text);
            tbStock.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Cost")){
            String text = txtStockSearch.getText();
            dt = db.searchStock(con, 3, text);
            tbStock.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnStockSearchActionPerformed

    private void txtStockSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtStockSearchActionPerformed
        // TODO add your handling code here:
        btnStockSearch.doClick();
    }//GEN-LAST:event_txtStockSearchActionPerformed

    private void btnTechSkillSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTechSkillSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbTechSkillSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("ID")){
            String text = txtTechSkillSearch.getText();
            dt = db.searchTechSkill(con, 1, text);
            tbTechSkill.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Name")){
            String text = txtTechSkillSearch.getText();
            dt = db.searchTechSkill(con, 2, text);
            tbTechSkill.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnTechSkillSearchActionPerformed

    private void txtTechSkillSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTechSkillSearchActionPerformed
        // TODO add your handling code here:
        btnTechSkillSearch.doClick();
    }//GEN-LAST:event_txtTechSkillSearchActionPerformed

    private void btnSpecializationSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSpecializationSearchActionPerformed
        // TODO add your handling code here:
        String searchBy = cbbSpecializationSearch.getSelectedItem().toString();

        PikaTableModel dt;

        if(searchBy.equalsIgnoreCase("ID")){
            String text = txtSpecializationSearch.getText();
            dt = db.searchSpecialization(con, 1, text);
            tbSpecialization.setModel(dt);

        }else if(searchBy.equalsIgnoreCase("Name")){
            String text = txtSpecializationSearch.getText();
            dt = db.searchSpecialization(con, 2, text);
            tbSpecialization.setModel(dt);

        }else{
            JOptionPane.showMessageDialog(this, "Please choose Search By!");
        }
    }//GEN-LAST:event_btnSpecializationSearchActionPerformed

    private void txtSpecializationSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSpecializationSearchActionPerformed
        // TODO add your handling code here:
        btnSpecializationSearch.doClick();
    }//GEN-LAST:event_txtSpecializationSearchActionPerformed

    private void tbStaffListPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbStaffListPropertyChange
        // TODO add your handling code here:
        int count = tbStaffList.getRowCount();
        lblStaffTotal.setText("Total Staff: " + count);

        if (tbStaffList.getModel().getColumnCount() > 0) {
            tbStaffList.getColumnModel().getColumn(0).setPreferredWidth(65);
            tbStaffList.getColumnModel().getColumn(1).setPreferredWidth(150);
            tbStaffList.getColumnModel().getColumn(2).setPreferredWidth(125);
            tbStaffList.getColumnModel().getColumn(3).setPreferredWidth(100);
            tbStaffList.getColumnModel().getColumn(4).setPreferredWidth(82);
            tbStaffList.getColumnModel().getColumn(5).setPreferredWidth(250);
            tbStaffList.getColumnModel().getColumn(6).setPreferredWidth(95);
            tbStaffList.getColumnModel().getColumn(7).setPreferredWidth(65);
            tbStaffList.getColumnModel().getColumn(8).setPreferredWidth(85);
            tbStaffList.getColumnModel().getColumn(9).setPreferredWidth(150);
            tbStaffList.getColumnModel().getColumn(10).setPreferredWidth(145);
            tbStaffList.getColumnModel().getColumn(11).setPreferredWidth(145);
        }
    }//GEN-LAST:event_tbStaffListPropertyChange

    private void cbbStaffSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbStaffSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbStaffSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbStaffSearchPopupMenuWillBecomeVisible

    private void cbbPatientSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbPatientSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbPatientSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbPatientSearchPopupMenuWillBecomeVisible

    private void cbbBillingSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbBillingSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbBillingSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbBillingSearchPopupMenuWillBecomeVisible

    private void cbbReportSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbReportSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbReportSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbReportSearchPopupMenuWillBecomeVisible

    private void cbbTestSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbTestSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbTestSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbTestSearchPopupMenuWillBecomeVisible

    private void cbbStockSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbStockSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbStockSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbStockSearchPopupMenuWillBecomeVisible

    private void tbPatientListPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbPatientListPropertyChange
        // TODO add your handling code here:
        lblPatientTotal.setText("Total Patient: " + tbPatientList.getRowCount());

        if (tbPatientList.getModel().getColumnCount() > 0) {
            tbPatientList.getColumnModel().getColumn(0).setPreferredWidth(75);
            tbPatientList.getColumnModel().getColumn(1).setPreferredWidth(150);
            tbPatientList.getColumnModel().getColumn(2).setPreferredWidth(85);
            tbPatientList.getColumnModel().getColumn(3).setPreferredWidth(275);
            tbPatientList.getColumnModel().getColumn(4).setPreferredWidth(100);
            tbPatientList.getColumnModel().getColumn(5).setPreferredWidth(60);
        }

        tbPatientListInBill.setModel(tbPatientList.getModel());
    }//GEN-LAST:event_tbPatientListPropertyChange

    private void tbPatientListInBillPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbPatientListInBillPropertyChange
        // TODO add your handling code here:
        lblBillingPatientTotal.setText("Total Patient: " + tbPatientListInBill.getRowCount());
    }//GEN-LAST:event_tbPatientListInBillPropertyChange

    private void tbReportPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbReportPropertyChange
        // TODO add your handling code here:
        lblReportTotal.setText("Total Report: " + tbReport.getRowCount());

        if (tbReport.getModel().getColumnCount() > 0) {
            tbReport.getColumnModel().getColumn(0).setPreferredWidth(75);
            tbReport.getColumnModel().getColumn(1).setPreferredWidth(110);
            tbReport.getColumnModel().getColumn(2).setPreferredWidth(65);
            tbReport.getColumnModel().getColumn(3).setPreferredWidth(125);
            tbReport.getColumnModel().getColumn(4).setPreferredWidth(80);
            tbReport.getColumnModel().getColumn(5).setPreferredWidth(150);
            tbReport.getColumnModel().getColumn(6).setPreferredWidth(75);
            tbReport.getColumnModel().getColumn(7).setPreferredWidth(150);
            tbReport.getColumnModel().getColumn(8).setPreferredWidth(80);
            tbReport.getColumnModel().getColumn(9).setPreferredWidth(250);
            tbReport.getColumnModel().getColumn(10).setPreferredWidth(250);
        }
    }//GEN-LAST:event_tbReportPropertyChange

    private void tbTestPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbTestPropertyChange
        // TODO add your handling code here:
        lblTestTotal.setText("Total Test: " + tbTest.getRowCount());

        if (tbTest.getModel().getColumnCount() > 0) {
            tbTest.getColumnModel().getColumn(0).setPreferredWidth(65);
            tbTest.getColumnModel().getColumn(1).setPreferredWidth(125);
            tbTest.getColumnModel().getColumn(2).setPreferredWidth(50);
        }
    }//GEN-LAST:event_tbTestPropertyChange

    private void tbStockPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbStockPropertyChange
        // TODO add your handling code here:
        lblStockTotal.setText("Total Stock: " + tbStock.getRowCount());

        if (tbStock.getModel().getColumnCount() > 0) {
            tbStock.getColumnModel().getColumn(0).setPreferredWidth(65);
            tbStock.getColumnModel().getColumn(1).setPreferredWidth(125);
            tbStock.getColumnModel().getColumn(2).setPreferredWidth(50);
            tbStock.getColumnModel().getColumn(3).setPreferredWidth(100);
            tbStock.getColumnModel().getColumn(4).setPreferredWidth(115);
        }
    }//GEN-LAST:event_tbStockPropertyChange

    private void tbTechSkillPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbTechSkillPropertyChange
        // TODO add your handling code here:
        lblTechSkilltotal.setText("Total Tech Skill: " + tbTechSkill.getRowCount());

        if (tbTechSkill.getModel().getColumnCount() > 0) {
            tbTechSkill.getColumnModel().getColumn(0).setPreferredWidth(100);
            tbTechSkill.getColumnModel().getColumn(1).setPreferredWidth(125);
        }
    }//GEN-LAST:event_tbTechSkillPropertyChange

    private void tbSpecializationPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbSpecializationPropertyChange
        // TODO add your handling code here:
        lblSpecializationTotal.setText("Total Specialization: " + tbSpecialization.getRowCount());

        if (tbSpecialization.getModel().getColumnCount() > 0) {
            tbSpecialization.getColumnModel().getColumn(0).setPreferredWidth(135);
            tbSpecialization.getColumnModel().getColumn(1).setPreferredWidth(150);
        }
    }//GEN-LAST:event_tbSpecializationPropertyChange

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_jMenuItem12ActionPerformed

    private void btnBillingAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillingAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {
            dlgAddBill dlgBill = new dlgAddBill(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgBill.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgBill.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgBill.getBill().getAmount() != -1) {
                // Gọi method add thôi
                if (db.addBill(con, dlgBill.getBill())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // hiển thị ra bill vừa tạo
                    PikaTableModel dt = db.displayBill(con);

                    //Lấy ra thứ tự dòng cuối cùng trong bảng bill
                    int max = dt.getRowCount() - 1;

                    // Lấy ra id của bill ở dòng cuối
                    String id = dt.getValueAt(max, 0).toString();

                    // Lấy ra bill đó đổ vào bảng
                    tbBilling.setModel(db.searchBilling(con, 1, id));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnBillingAddActionPerformed

    private void btnPatientStatisticActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatientStatisticActionPerformed
        // TODO add your handling code here:
        if (tbPatientList.getSelectedRow() != -1) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setPatientID(Integer.parseInt(tbPatientList.getValueAt(tbPatientList.getSelectedRow(), 0).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);         
        }else{
            JOptionPane.showMessageDialog(this, "Select One Patient at the Table below!");
        }
    }//GEN-LAST:event_btnPatientStatisticActionPerformed

    private void btnBillingStatisticActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillingStatisticActionPerformed
        // TODO add your handling code here:
        if (tbBilling.getSelectedRow() != -1) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setBillID(tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString());
            ps.setPatientID(Integer.parseInt(tbBilling.getValueAt(tbBilling.getSelectedRow(), 1).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);
        }else{
            JOptionPane.showMessageDialog(this, "Select One Bill at the Table below!");
        }
    }//GEN-LAST:event_btnBillingStatisticActionPerformed

    private void btnReportStatisticActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportStatisticActionPerformed
        // TODO add your handling code here:
        if (tbReport.getSelectedRow() != -1) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setReportID(tbReport.getValueAt(tbReport.getSelectedRow(), 0).toString());
            ps.setPatientID(Integer.parseInt(tbReport.getValueAt(tbReport.getSelectedRow(), 4).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);
        }else{
            JOptionPane.showMessageDialog(this, "Select One Report at the Table below!");
        }
    }//GEN-LAST:event_btnReportStatisticActionPerformed

    private void tbBillingPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbBillingPropertyChange
        // TODO add your handling code here:
        lblBillTotal.setText("Total Bill: " + tbBilling.getRowCount());

        double sum = 0;

        for (int i = 0; i < tbBilling.getRowCount(); i++) {
            sum += (Double) tbBilling.getValueAt(i, 5);
        }

        lblTotalMoney.setText("Total Amount: " + sum);

        if (tbBilling.getModel().getColumnCount() > 0) {
            tbBilling.getColumnModel().getColumn(0).setPreferredWidth(60);
            tbBilling.getColumnModel().getColumn(1).setPreferredWidth(75);
            tbBilling.getColumnModel().getColumn(2).setPreferredWidth(150);
            tbBilling.getColumnModel().getColumn(3).setPreferredWidth(80);
            tbBilling.getColumnModel().getColumn(4).setPreferredWidth(150);
            tbBilling.getColumnModel().getColumn(5).setPreferredWidth(55);
            tbBilling.getColumnModel().getColumn(6).setPreferredWidth(85);
            tbBilling.getColumnModel().getColumn(7).setPreferredWidth(85);
            tbBilling.getColumnModel().getColumn(8).setPreferredWidth(55);
        }
}//GEN-LAST:event_tbBillingPropertyChange

    private void tbTestPurchasePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbTestPurchasePropertyChange
        // TODO add your handling code here:
        lblTestPurchaseTotal.setText("Total Test Purchase: " + tbTestPurchase.getRowCount());

        if (tbTestPurchase.getModel().getColumnCount() > 0) {
            tbTestPurchase.getColumnModel().getColumn(0).setPreferredWidth(125);
            tbTestPurchase.getColumnModel().getColumn(1).setPreferredWidth(65);
            tbTestPurchase.getColumnModel().getColumn(2).setPreferredWidth(65);
            tbTestPurchase.getColumnModel().getColumn(3).setPreferredWidth(125);
            tbTestPurchase.getColumnModel().getColumn(4).setPreferredWidth(60);
            tbTestPurchase.getColumnModel().getColumn(5).setPreferredWidth(90);
        }
}//GEN-LAST:event_tbTestPurchasePropertyChange

    private void tbStockPurchasePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbStockPurchasePropertyChange
        // TODO add your handling code here:
        lblStockPurchaseTotal.setText("Total Stock Purchase:  " + tbStockPurchase.getRowCount());

        if (tbStockPurchase.getModel().getColumnCount() > 0) {
            tbStockPurchase.getColumnModel().getColumn(0).setPreferredWidth(125);
            tbStockPurchase.getColumnModel().getColumn(1).setPreferredWidth(65);
            tbStockPurchase.getColumnModel().getColumn(2).setPreferredWidth(65);
            tbStockPurchase.getColumnModel().getColumn(3).setPreferredWidth(125);
            tbStockPurchase.getColumnModel().getColumn(4).setPreferredWidth(60);
            tbStockPurchase.getColumnModel().getColumn(5).setPreferredWidth(60);
            tbStockPurchase.getColumnModel().getColumn(6).setPreferredWidth(90);
        }
}//GEN-LAST:event_tbStockPurchasePropertyChange

    private void tbPatientListInBillPropertyChange1(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_tbPatientListInBillPropertyChange1
        // TODO add your handling code here:
        lblBillingPatientTotal.setText("Total Patient: " + tbPatientListInBill.getRowCount());

        if (tbPatientListInBill.getModel().getColumnCount() > 0) {
            tbPatientListInBill.getColumnModel().getColumn(0).setPreferredWidth(75);
            tbPatientListInBill.getColumnModel().getColumn(1).setPreferredWidth(150);
            tbPatientListInBill.getColumnModel().getColumn(2).setPreferredWidth(85);
            tbPatientListInBill.getColumnModel().getColumn(3).setPreferredWidth(275);
            tbPatientListInBill.getColumnModel().getColumn(4).setPreferredWidth(100);
            tbPatientListInBill.getColumnModel().getColumn(5).setPreferredWidth(60);
        }
    }//GEN-LAST:event_tbPatientListInBillPropertyChange1

    private void tbBillingKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tbBillingKeyReleased
        // TODO add your handling code here:
        String billID = tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString();
        String patientID = tbBilling.getValueAt(tbBilling.getSelectedRow(), 1).toString();

        tbTestPurchase.setModel(db.searchTestPurchase(con, billID));
        tbStockPurchase.setModel(db.searchStockPurchase(con, billID));
        tbPatientListInBill.setModel(db.searchPatient(con, 1, patientID));
    }//GEN-LAST:event_tbBillingKeyReleased

    private void tbBillingMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbBillingMousePressed
        // TODO add your handling code here:
        String billID = tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString();
        String patientID = tbBilling.getValueAt(tbBilling.getSelectedRow(), 1).toString();

        tbTestPurchase.setModel(db.searchTestPurchase(con, billID));
        tbStockPurchase.setModel(db.searchStockPurchase(con, billID));
        tbPatientListInBill.setModel(db.searchPatient(con, 1, patientID));
    }//GEN-LAST:event_tbBillingMousePressed

    private void btnStaffDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStaffDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbStaffList.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String staffID = tbStaffList.getValueAt(tbStaffList.getSelectedRow(), 0).toString();

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Staff: " + staffID);

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteStaff(con, staffID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbStaffList.setModel(db.displayStaff(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Staff at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStaffDeleteActionPerformed

    private void btnPatientDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatientDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {
            if (tbPatientList.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                int patientID = Integer.parseInt(tbPatientList.getValueAt(tbPatientList.getSelectedRow(), 0).toString());

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Patient: " + patientID + " (All his/her report and bill will be deleted)?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deletePatient(con, patientID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbPatientList.setModel(db.displayPatient(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Patient at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnPatientDeleteActionPerformed

    private void btnBillingDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillingDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {           
            if (tbBilling.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                int billID = Integer.parseInt(tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString());

                if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register") && Double.parseDouble(db.searchBilling(con, 1, "" + billID).getValueAt(0, 5).toString()) != 0) {
                    JOptionPane.showMessageDialog(this, "You only can delete bill have zero amount!");
                } else {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Bill: " + billID + " (All report of this bill's test will be deleted)?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.deleteBill(con, billID);
                    }

                    // Hiển thị lại bảng Staff sau khi đã xóa
                    // Chỉnh lại bảng và method hiển thị tương ứng
                    tbBilling.setModel(db.displayBill(con));
                }
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Bill at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnBillingDeleteActionPerformed

    private void btnReportDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Doctor")) {
            if (tbReport.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                int reportID = Integer.parseInt(tbReport.getValueAt(tbReport.getSelectedRow(), 0).toString());

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Report: " + reportID + "?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteReport(con, reportID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbReport.setModel(db.displayReport(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Report at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnReportDeleteActionPerformed

    private void btnTestDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTestDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbTest.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String testID = tbTest.getValueAt(tbTest.getSelectedRow(), 0).toString();

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Test: " + testID + " (All report of this test will be deleted)?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteTest(con, testID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbTest.setModel(db.displayTest(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Test at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTestDeleteActionPerformed

    private void btnStockDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStockDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbStock.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String stockID = tbStock.getValueAt(tbStock.getSelectedRow(), 0).toString();

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Stock: " + stockID + "?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteStock(con, stockID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbStock.setModel(db.displayStock(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Stock at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStockDeleteActionPerformed

    private void btnTechSkillDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTechSkillDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbTechSkill.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String techSkillID = tbTechSkill.getValueAt(tbTechSkill.getSelectedRow(), 0).toString();

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete TechSkill: " + techSkillID + "?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteTechSkill(con, techSkillID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbTechSkill.setModel(db.displayTechSkill(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a TechSkill at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTechSkillDeleteActionPerformed

    private void btnSpecializationDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSpecializationDeleteActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbSpecialization.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String specializationID = tbSpecialization.getValueAt(tbSpecialization.getSelectedRow(), 0).toString();

                // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                // dùng ở dialog bật lên
                // Khi copy nhớ sửa lại thông báo cho phù hợp
                int choice = JOptionPane.showConfirmDialog(this, "Are you sure to delete Specialization: " + specializationID + "?");

                // Nếu người dùng chọn yes ở bảng dialog bật lên
                if (choice == JOptionPane.YES_OPTION) {
                    // Gọi method xóa Staff
                    // Copy nhớ chỉnh lại thành method tương ứng
                    db.deleteSpecialization(con, specializationID);
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbSpecialization.setModel(db.displaySpecialization(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Specialization at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnSpecializationDeleteActionPerformed

    private void cbbTechSkillSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbTechSkillSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbTechSkillSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbTechSkillSearchPopupMenuWillBecomeVisible

    private void cbbSpecializationSearchPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_cbbSpecializationSearchPopupMenuWillBecomeVisible
        // TODO add your handling code here:
        cbbSpecializationSearch.setSelectedIndex(0);
    }//GEN-LAST:event_cbbSpecializationSearchPopupMenuWillBecomeVisible

    private void btnSpecializationAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSpecializationAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            dlgAddSpecialization dlgSpec = new dlgAddSpecialization(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgSpec.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgSpec.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgSpec.getSpecialization() != null) {
                // Gọi method add thôi
                if (db.addSpecialization(con, dlgSpec.getSpecialization())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // Lấy ra bill đó đổ vào bảng
                    tbSpecialization.setModel(db.searchSpecialization(con, 1, dlgSpec.getSpecialization().getSpecialID()));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnSpecializationAddActionPerformed

    private void btnTechSkillAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTechSkillAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            dlgAddTechSkill dlgTechSkill = new dlgAddTechSkill(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgTechSkill.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgTechSkill.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgTechSkill.getTechSkill() != null) {
                // Gọi method add thôi
                if (db.addTechSkill(con, dlgTechSkill.getTechSkill())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // Lấy ra bill đó đổ vào bảng
                    tbTechSkill.setModel(db.searchTechSkill(con, 1, dlgTechSkill.getTechSkill().getTechSkillID()));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTechSkillAddActionPerformed

    private void btnTestAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTestAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            dlgAddTest dlgTest = new dlgAddTest(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgTest.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgTest.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgTest.getTest() != null) {
                // Gọi method add thôi
                if (db.addTest(con, dlgTest.getTest())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // Lấy ra bill đó đổ vào bảng
                    tbTest.setModel(db.searchTest(con, 1, dlgTest.getTest().getTestID()));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTestAddActionPerformed

    private void btnStockAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStockAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            dlgAddStock dlgStock = new dlgAddStock(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgStock.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgStock.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgStock.getStock() != null) {
                // Gọi method add thôi
                if (db.addStock(con, dlgStock.getStock())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // Lấy ra bill đó đổ vào bảng
                    tbStock.setModel(db.searchStock(con, 1, dlgStock.getStock().getStockID()));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStockAddActionPerformed

    private void btnPatientAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatientAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {
            dlgAddPatient dlgPatient = new dlgAddPatient(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgPatient.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgPatient.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgPatient.getPatient() != null) {
                // Gọi method add thôi
                if (db.addPatient(con, dlgPatient.getPatient())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // hiển thị ra bill vừa tạo
                    PikaTableModel dp = db.displayPatient(con);

                    //Lấy ra thứ tự dòng cuối cùng trong bảng bill
                    int maxP = dp.getRowCount() - 1;

                    // Lấy ra id của bill ở dòng cuối
                    String idp = dp.getValueAt(maxP, 0).toString();

                    // Lấy ra aptient đó đổ vào bảng
                    tbPatientList.setModel(db.searchPatient(con, 1, idp));

                    int choice = JOptionPane.showConfirmDialog(this, "Do you want to add bill for this patient?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        dlgAddBill dlgBill = new dlgAddBill(this, true);

                        Bill bil = new Bill();
                        bil.setPatientID(dlgPatient.getPatient().getPatientID());

                        dlgBill.setBil(bil);

                        dlgBill.getBtnBillingAction().doClick();

                        if (dlgBill.getBill().getAmount() != -1) {
                            // Gọi method add thôi
                            if (db.addBill(con, dlgBill.getBill())) {
                                JOptionPane.showMessageDialog(this, "Add successful!");

                                // hiển thị ra bill vừa tạo
                                PikaTableModel dt = db.displayBill(con);

                                //Lấy ra thứ tự dòng cuối cùng trong bảng bill
                                int max = dt.getRowCount() - 1;

                                // Lấy ra id của bill ở dòng cuối
                                String id = dt.getValueAt(max, 0).toString();

                                // Lấy ra bill đó đổ vào bảng
                                tbBilling.setModel(db.searchBilling(con, 1, id));
                            } else {
                                JOptionPane.showMessageDialog(this, "Add failures!");
                            }
                        }

                        CardLayout card2 = (CardLayout) pnlMain.getLayout();
                        card2.show(pnlMain, "cardBilling");
                    }
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnPatientAddActionPerformed

    private void btnReportAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Doctor")) {
            dlgAddReport dlgReport = new dlgAddReport(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgReport.setLocationRelativeTo(this);

            dlgReport.setStaffID(staffID);
            
            // hiển thị dialog
            dlgReport.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgReport.getReport() != null) {
                // Gọi method add thôi
                if (db.addReport(con, dlgReport.getReport())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // hiển thị ra bill vừa tạo
                    PikaTableModel dt = db.displayReport(con);

                    //Lấy ra thứ tự dòng cuối cùng trong bảng bill
                    int max = dt.getRowCount() - 1;

                    // Lấy ra id của bill ở dòng cuối
                    String id = dt.getValueAt(max, 0).toString();

                    // Lấy ra bill đó đổ vào bảng
                    tbReport.setModel(db.searchReport(con, 1, id));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnReportAddActionPerformed

    private void btnSpecializationEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSpecializationEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbSpecialization.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String specializationID = tbSpecialization.getValueAt(tbSpecialization.getSelectedRow(), 0).toString();
                String specializationName = tbSpecialization.getValueAt(tbSpecialization.getSelectedRow(), 1).toString();

                dlgEditSpecialization dlgEidSpec = new dlgEditSpecialization(this, true);

                Specialization spec = new Specialization();
                spec.setSpecialID(specializationID);

                dlgEidSpec.setSpec(spec);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidSpec.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidSpec.setVisible(true);

                if (dlgEidSpec.getSpecialization().getSpeciallName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Specialization: " + specializationID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editSpecialization(con, specializationID, dlgEidSpec.getSpecialization());
                    }
                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbSpecialization.setModel(db.displaySpecialization(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Specialization at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnSpecializationEditActionPerformed

    private void btnTechSkillEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTechSkillEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbTechSkill.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String techID = tbTechSkill.getValueAt(tbTechSkill.getSelectedRow(), 0).toString();
                String techName = tbTechSkill.getValueAt(tbTechSkill.getSelectedRow(), 1).toString();

                dlgEditTechSkill dlgEidtech = new dlgEditTechSkill(this, true);

                TechSkill tec = new TechSkill();
                tec.setTechSkillID(techID);

                dlgEidtech.setTec(tec);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidtech.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidtech.setVisible(true);

                if (dlgEidtech.getTechSkill().getTechSkillName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Tech Skill: " + techID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editTechSkill(con, techID, dlgEidtech.getTechSkill());
                    }

                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbTechSkill.setModel(db.displayTechSkill(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Tech Skill at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTechSkillEditActionPerformed

    private void btnStockEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStockEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbStock.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String stockID = tbStock.getValueAt(tbStock.getSelectedRow(), 0).toString();

                dlgEditStock dlgEidStock = new dlgEditStock(this, true);

                Stock tock = new Stock();

                tock.setStockID(stockID);

                dlgEidStock.setStock(tock);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidStock.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidStock.setVisible(true);

                if (dlgEidStock.getStock().getStockName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Stock: " + stockID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editStock(con, stockID, dlgEidStock.getStock());
                    }

                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbStock.setModel(db.displayStock(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Stock at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStockEditActionPerformed

    private void btnTestEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTestEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbTest.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String testID = tbTest.getValueAt(tbTest.getSelectedRow(), 0).toString();

                dlgEditTest dlgEidTest = new dlgEditTest(this, true);

                Test te = new Test();

                te.setTestID(testID);

                dlgEidTest.setTes(te);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidTest.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidTest.setVisible(true);

                if (dlgEidTest.getTest().getTestName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Test: " + testID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editTest(con, testID, dlgEidTest.getTest());
                    }

                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbTest.setModel(db.displayTest(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Test at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnTestEditActionPerformed

    private void btnPatientEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatientEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {
            if (tbPatientList.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                int patientID = Integer.parseInt(tbPatientList.getValueAt(tbPatientList.getSelectedRow(), 0).toString());

                dlgEditPatient dlgEidPatient = new dlgEditPatient(this, true);

                Patient pat = new Patient();

                pat.setPatientID(patientID);

                dlgEidPatient.setPatient(pat);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidPatient.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidPatient.setVisible(true);

                if (dlgEidPatient.getPatient().getFirstName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Patient: " + patientID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editPatient(con, patientID, dlgEidPatient.getPatient());
                    }

                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbPatientList.setModel(db.displayPatient(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Patient at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnPatientEditActionPerformed

    private void btnReportEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin") || db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Doctor")) {
            if (tbReport.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                int reportID = Integer.parseInt(tbReport.getValueAt(tbReport.getSelectedRow(), 0).toString());

                dlgEditReport dlgEidreport = new dlgEditReport(this, true);

                Report re = new Report();

                re.setReportID(reportID);

                dlgEidreport.setReport(re);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidreport.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidreport.setVisible(true);

                if (dlgEidreport.getReport().getPatientID() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Report: " + reportID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        db.editReport(con, reportID, dlgEidreport.getReport());
                    }

                }

                // Hiển thị lại bảng Staff sau khi đã xóa
                // Chỉnh lại bảng và method hiển thị tương ứng
                tbReport.setModel(db.displayReport(con));
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Report at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnReportEditActionPerformed

    private void btnBillingEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillingEditActionPerformed
        // TODO add your handling code here:
        if (tbBilling.getSelectedRow() != -1) {
            // Lấy StaffId từ select ở bảng bên dưới
            // Các thứ cần sửa lại:
            // staffId: Sửa thành Id phù hợp
            // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
            int billID = Integer.parseInt(tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString());

            dlgEditBill dlgEidBill = new dlgEditBill(this, true);

            Bill bil = new Bill();

            bil.setBillID(billID);

            dlgEidBill.setStaffID(staffID);

            dlgEidBill.setBill(bil);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgEidBill.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgEidBill.setVisible(true);           

            // Hiển thị lại bảng Staff sau khi đã xóa
            // Chỉnh lại bảng và method hiển thị tương ứng
            tbBilling.setModel(db.searchBilling(con, 1, "" + billID));

            if (dlgEidBill.getReportTestP() != null) {
                dlgAddReport dlgReport = new dlgAddReport(this, true);

                dlgReport.getTxtReportTestPurchase().setText(dlgEidBill.getReportTestP());

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgReport.setLocationRelativeTo(this);

                dlgReport.setStaffID(staffID);

                // hiển thị dialog
                dlgReport.setVisible(true);

                // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
                // cancel thì bill sẽ bị trống)
                if (dlgReport.getReport() != null) {
                    // Gọi method add thôi
                    if (db.addReport(con, dlgReport.getReport())) {
                        JOptionPane.showMessageDialog(this, "Add successful!");

                        // hiển thị ra bill vừa tạo
                        PikaTableModel dt = db.displayReport(con);

                        //Lấy ra thứ tự dòng cuối cùng trong bảng bill
                        int max = dt.getRowCount() - 1;

                        // Lấy ra id của bill ở dòng cuối
                        String id = dt.getValueAt(max, 0).toString();

                        CardLayout card2 = (CardLayout) pnlMain.getLayout();
                        card2.show(pnlMain, "cardReport");

                        // Lấy ra bill đó đổ vào bảng
                        tbReport.setModel(db.searchReport(con, 1, id));
                    } else {
                        JOptionPane.showMessageDialog(this, "Add failures!");
                    }
                }
            }
        }else{
            JOptionPane.showMessageDialog(this, "Please choose a Report at table below!");
        }
    }//GEN-LAST:event_btnBillingEditActionPerformed

    private void btnStaffAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStaffAddActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            dlgAddStaff dlgStaff = new dlgAddStaff(this, true);

            // Lệnh này hiển thị dialog ở chính giữa chương trình
            dlgStaff.setLocationRelativeTo(this);

            // hiển thị dialog
            dlgStaff.setVisible(true);

            // Kiểm tra xem bill của dialog có trống ko(nếu người dùng nhấn
            // cancel thì bill sẽ bị trống)
            if (dlgStaff.getStaf() != null) {
                // Gọi method add thôi
                if (db.addStaff(con, dlgStaff.getStaf())) {
                    JOptionPane.showMessageDialog(this, "Add successful!");

                    // Lấy ra bill đó đổ vào bảng
                    tbStaffList.setModel(db.searchStaff(con, 1, dlgStaff.getStaf().getStaffID()));
                } else {
                    JOptionPane.showMessageDialog(this, "Add failures!");
                }
            }
        }else{
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStaffAddActionPerformed

    private void btnStaffEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStaffEditActionPerformed
        // TODO add your handling code here:
        if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {
            if (tbStaffList.getSelectedRow() != -1) {
                // Lấy StaffId từ select ở bảng bên dưới
                // Các thứ cần sửa lại:
                // staffId: Sửa thành Id phù hợp
                // tbStaffList: sửa thành bảng tương ứng(bảng liệt kể list vd: Staff ngay bên dưới nút delete)
                String staffID = tbStaffList.getValueAt(tbStaffList.getSelectedRow(), 0).toString();

                dlgEditStaff dlgEidStaff = new dlgEditStaff(this, true);

                Staff sta = new Staff();

                sta.setStaffID(staffID);

                dlgEidStaff.setStaf(sta);

                // Lệnh này hiển thị dialog ở chính giữa chương trình
                dlgEidStaff.setLocationRelativeTo(this);

                // hiển thị dialog
                dlgEidStaff.setVisible(true);

                if (dlgEidStaff.getStaf().getFirstName() != null) {
                    // Thông báo: Hỏi xem người dùng có muốn xóa ko, biến choice lưu lại lựa chọn của người
                    // dùng ở dialog bật lên
                    // Khi copy nhớ sửa lại thông báo cho phù hợp
                    int choice = JOptionPane.showConfirmDialog(this, "Are you sure to edit Staff: " + staffID + "?");

                    // Nếu người dùng chọn yes ở bảng dialog bật lên
                    if (choice == JOptionPane.YES_OPTION) {
                        // Gọi method xóa Staff
                        // Copy nhớ chỉnh lại thành method tương ứng
                        if (dlgEidStaff.getStaf().getPassword() != null) {
                            db.editStaff(con, staffID, dlgEidStaff.getStaf());
                        } else {
                            db.editStaffNoPass(con, staffID, dlgEidStaff.getStaf());
                        }
                    }

                    // Hiển thị lại bảng Staff sau khi đã xóa
                    // Chỉnh lại bảng và method hiển thị tương ứng
                    tbStaffList.setModel(db.searchStaff(con, 1, staffID));

                }
            } else {
                JOptionPane.showMessageDialog(this, "Please choose a Staff at table below!");
            }
        } else {
            JOptionPane.showMessageDialog(this, "You do not have permission to do this!");
        }
    }//GEN-LAST:event_btnStaffEditActionPerformed

    private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed
        // TODO add your handling code here:
        con  = db.ConnectServer();
        MD5Passing md5 = new MD5Passing();
       
        if (con != null) {
            if (db.login(con, txtUserName.getText()) != null) {
                if (db.login(con, txtUserName.getText()).compareTo(md5.makePass(pssPassWord.getText())) == 0) {
                    // Luu id nguoi dung dang nhap
                    staffID = db.searchStaff(con, 6, txtUserName.getText()).getValueAt(0, 0).toString();

                    // Enable menu
                    mnuUser.setEnabled(true);
                    mnuManage.setEnabled(true);
                    mnuAdmin.setEnabled(true);
                    mnuHelp.setEnabled(true);

                    // Load tat ca du lieu vao cac bang
                    tbBilling.setModel(db.displayBill(con));
                    tbPatientList.setModel(db.displayPatient(con));
                    tbReport.setModel(db.displayReport(con));
                    tbSpecialization.setModel(db.displaySpecialization(con));
                    tbStaffList.setModel(db.displayStaff(con));
                    tbStock.setModel(db.displayStock(con));
                    tbTechSkill.setModel(db.displayTechSkill(con));
                    tbTest.setModel(db.displayTest(con));

                    this.setTitle("PikaLife - Pathology Lab Management System - " + txtUserName.getText());

                    if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Patient Register")) {
                        btnStaffAdd.setEnabled(false);
                        btnStaffDelete.setEnabled(false);
                        btnStaffEdit.setEnabled(false);

                        btnReportAdd.setEnabled(false);
                        btnReportDelete.setEnabled(false);
                        btnReportEdit.setEnabled(false);

                        btnStockAdd.setEnabled(false);
                        btnStockDelete.setEnabled(false);
                        btnStockEdit.setEnabled(false);

                        btnTestAdd.setEnabled(false);
                        btnTestDelete.setEnabled(false);
                        btnTestEdit.setEnabled(false);

                        btnTechSkillAdd.setEnabled(false);
                        btnTechSkillDelete.setEnabled(false);
                        btnTechSkillEdit.setEnabled(false);

                        btnSpecializationAdd.setEnabled(false);
                        btnSpecializationDelete.setEnabled(false);
                        btnSpecializationEdit.setEnabled(false);
                    } else if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Tester")) {
                        btnStaffAdd.setEnabled(false);
                        btnStaffDelete.setEnabled(false);
                        btnStaffEdit.setEnabled(false);

                        btnReportAdd.setEnabled(false);
                        btnReportDelete.setEnabled(false);
                        btnReportEdit.setEnabled(false);

                        btnStockAdd.setEnabled(false);
                        btnStockDelete.setEnabled(false);
                        btnStockEdit.setEnabled(false);

                        btnTestAdd.setEnabled(false);
                        btnTestDelete.setEnabled(false);
                        btnTestEdit.setEnabled(false);

                        btnTechSkillAdd.setEnabled(false);
                        btnTechSkillDelete.setEnabled(false);
                        btnTechSkillEdit.setEnabled(false);

                        btnSpecializationAdd.setEnabled(false);
                        btnSpecializationDelete.setEnabled(false);
                        btnSpecializationEdit.setEnabled(false);

                        btnBillingAdd.setEnabled(false);
                        btnBillingDelete.setEnabled(false);

                        btnPatientAdd.setEnabled(false);
                        btnPatientDelete.setEnabled(false);
                        btnPatientEdit.setEnabled(false);
                    } else if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Doctor")) {
                        btnStaffAdd.setEnabled(false);
                        btnStaffDelete.setEnabled(false);
                        btnStaffEdit.setEnabled(false);

                        btnStockAdd.setEnabled(false);
                        btnStockDelete.setEnabled(false);
                        btnStockEdit.setEnabled(false);

                        btnTestAdd.setEnabled(false);
                        btnTestDelete.setEnabled(false);
                        btnTestEdit.setEnabled(false);

                        btnTechSkillAdd.setEnabled(false);
                        btnTechSkillDelete.setEnabled(false);
                        btnTechSkillEdit.setEnabled(false);

                        btnSpecializationAdd.setEnabled(false);
                        btnSpecializationDelete.setEnabled(false);
                        btnSpecializationEdit.setEnabled(false);

                        btnBillingAdd.setEnabled(false);
                        btnBillingDelete.setEnabled(false);

                        btnPatientAdd.setEnabled(false);
                        btnPatientDelete.setEnabled(false);
                        btnPatientEdit.setEnabled(false);
                    } else if (db.searchStaff(con, 1, staffID).getValueAt(0, 3).toString().equalsIgnoreCase("Server Admin")) {

                        btnBillingAdd.setEnabled(false);
                        btnBillingEdit.setEnabled(false);
                        btnBillingDelete.setEnabled(false);

                        btnPatientAdd.setEnabled(false);
                        btnPatientDelete.setEnabled(false);
                        btnPatientEdit.setEnabled(false);

                        btnReportAdd.setEnabled(false);
                        btnReportDelete.setEnabled(false);
                        btnReportEdit.setEnabled(false);
                    }

                    // Chuyen sang layout lam viec
                    CardLayout card = (CardLayout) this.getContentPane().getLayout();
                    card.next(this.getContentPane());
                } else {
                    JOptionPane.showMessageDialog(this, "Wrong Password or Username!");
                }
            } else {
                JOptionPane.showMessageDialog(this, "Wrong Password or Username!");
            }
        }
    }//GEN-LAST:event_btnLoginActionPerformed

    private void pssPassWordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pssPassWordActionPerformed
        // TODO add your handling code here:
        btnLogin.doClick();
    }//GEN-LAST:event_pssPassWordActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
        // TODO add your handling code here:
        // Luu id nguoi dung dang nhap
        staffID = null;;

        // Enable menu
        mnuUser.setEnabled(false);
        mnuManage.setEnabled(false);
        mnuAdmin.setEnabled(false);
        mnuHelp.setEnabled(false);

        txtUserName.setText(null);
        pssPassWord.setText(null);


        btnStaffAdd.setEnabled(true);
        btnStaffDelete.setEnabled(true);
        btnStaffEdit.setEnabled(true);

        btnStockAdd.setEnabled(true);
        btnStockDelete.setEnabled(true);
        btnStockEdit.setEnabled(true);

        btnTestAdd.setEnabled(true);
        btnTestDelete.setEnabled(true);
        btnTestEdit.setEnabled(true);

        btnTechSkillAdd.setEnabled(true);
        btnTechSkillDelete.setEnabled(true);
        btnTechSkillEdit.setEnabled(true);

        btnSpecializationAdd.setEnabled(true);
        btnSpecializationDelete.setEnabled(true);
        btnSpecializationEdit.setEnabled(true);

        btnBillingAdd.setEnabled(true);
        btnBillingDelete.setEnabled(true);
        btnBillingEdit.setEnabled(true);

        btnPatientAdd.setEnabled(true);
        btnPatientDelete.setEnabled(true);
        btnPatientEdit.setEnabled(true);

        btnReportAdd.setEnabled(true);
        btnReportDelete.setEnabled(true);
        btnReportEdit.setEnabled(true);

        // Chuyen sang layout lam viec
        CardLayout card = (CardLayout) this.getContentPane().getLayout();
        card.previous(this.getContentPane());
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMenuItem4ActionPerformed1(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed1
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardPatient");
    }//GEN-LAST:event_jMenuItem4ActionPerformed1

    private void jMenuItem5ActionPerformed1(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed1
        // TODO add your handling code here:
        CardLayout card2 = (CardLayout) pnlMain.getLayout();
        card2.show(pnlMain, "cardBilling");
    }//GEN-LAST:event_jMenuItem5ActionPerformed1

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        // TODO add your handling code here:
        dlgChangePassword change = new dlgChangePassword(this, true);

        change.setUsername(txtUserName.getText());

        change.setLocationRelativeTo(this);

        change.setVisible(true);
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void tbPatientListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbPatientListMouseClicked
        // TODO add your handling code here:
        if (evt.getClickCount() == 2) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setPatientID(Integer.parseInt(tbPatientList.getValueAt(tbPatientList.getSelectedRow(), 0).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);   
        }
    }//GEN-LAST:event_tbPatientListMouseClicked

    private void tbBillingMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbBillingMouseClicked
        // TODO add your handling code here:
        if (evt.getClickCount() == 2) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setBillID(tbBilling.getValueAt(tbBilling.getSelectedRow(), 0).toString());
            ps.setPatientID(Integer.parseInt(tbBilling.getValueAt(tbBilling.getSelectedRow(), 1).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);

        }
    }//GEN-LAST:event_tbBillingMouseClicked

    private void tbReportMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbReportMouseClicked
        // TODO add your handling code here:
        if (evt.getClickCount() == 2) {
            dlgPatientStatic ps = new dlgPatientStatic(this, false);

            ps.setReportID(tbReport.getValueAt(tbReport.getSelectedRow(), 0).toString());
            ps.setPatientID(Integer.parseInt(tbReport.getValueAt(tbReport.getSelectedRow(), 4).toString()));

            ps.setStaffID(staffID);

            ps.loadDB();

            ps.setLocationRelativeTo(this);
            ps.setVisible(true);

        }
    }//GEN-LAST:event_tbReportMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PikaLife().setVisible(true);
            }
        });
    }

    /**
     * Biến chứa id người dùng đăng nhập vào chương trình
     */
    private String staffID = null;

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup btgPaid;
    private javax.swing.ButtonGroup btgPatientGender;
    private javax.swing.ButtonGroup btgStaffGender;
    private javax.swing.JButton btnBillingAdd;
    private javax.swing.JButton btnBillingDelete;
    private javax.swing.JButton btnBillingEdit;
    private javax.swing.JButton btnBillingSearch;
    private javax.swing.JButton btnBillingStatistic;
    private javax.swing.JButton btnLogin;
    private javax.swing.JButton btnPatientAdd;
    private javax.swing.JButton btnPatientDelete;
    private javax.swing.JButton btnPatientEdit;
    private javax.swing.JButton btnPatientSearch;
    private javax.swing.JButton btnPatientStatistic;
    private javax.swing.JButton btnReportAdd;
    private javax.swing.JButton btnReportDelete;
    private javax.swing.JButton btnReportEdit;
    private javax.swing.JButton btnReportSearch;
    private javax.swing.JButton btnReportStatistic;
    private javax.swing.JButton btnSpecializationAdd;
    private javax.swing.JButton btnSpecializationDelete;
    private javax.swing.JButton btnSpecializationEdit;
    private javax.swing.JButton btnSpecializationSearch;
    private javax.swing.JButton btnStaffAdd;
    private javax.swing.JButton btnStaffDelete;
    private javax.swing.JButton btnStaffEdit;
    private javax.swing.JButton btnStaffSearch;
    private javax.swing.JButton btnStockAdd;
    private javax.swing.JButton btnStockDelete;
    private javax.swing.JButton btnStockEdit;
    private javax.swing.JButton btnStockSearch;
    private javax.swing.JButton btnTechSkillAdd;
    private javax.swing.JButton btnTechSkillDelete;
    private javax.swing.JButton btnTechSkillEdit;
    private javax.swing.JButton btnTechSkillSearch;
    private javax.swing.JButton btnTestAdd;
    private javax.swing.JButton btnTestDelete;
    private javax.swing.JButton btnTestEdit;
    private javax.swing.JButton btnTestSearch;
    private javax.swing.JComboBox cbbBillingSearch;
    private javax.swing.JComboBox cbbPatientSearch;
    private javax.swing.JComboBox cbbReportSearch;
    private javax.swing.JComboBox cbbSpecializationSearch;
    private javax.swing.JComboBox cbbStaffSearch;
    private javax.swing.JComboBox cbbStockSearch;
    private javax.swing.JComboBox cbbTechSkillSearch;
    private javax.swing.JComboBox cbbTestSearch;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JScrollPane jst2;
    private javax.swing.JLabel lblBillTotal;
    private javax.swing.JLabel lblBillingPatientTotal;
    private javax.swing.JLabel lblPatientTotal;
    private javax.swing.JLabel lblReportTotal;
    private javax.swing.JLabel lblSpecializationTotal;
    private javax.swing.JLabel lblStaffTotal;
    private javax.swing.JLabel lblStockPurchaseTotal;
    private javax.swing.JLabel lblStockTotal;
    private javax.swing.JLabel lblTechSkilltotal;
    private javax.swing.JLabel lblTestPurchaseTotal;
    private javax.swing.JLabel lblTestTotal;
    private javax.swing.JLabel lblTotalMoney;
    private javax.swing.JMenu mnuAdmin;
    private javax.swing.JMenuBar mnuBar;
    private javax.swing.JMenu mnuHelp;
    private javax.swing.JMenu mnuManage;
    private javax.swing.JMenu mnuUser;
    private javax.swing.JPanel pnlBill;
    private javax.swing.JPanel pnlBillTotal;
    private javax.swing.JPanel pnlBillTotalMoney;
    private javax.swing.JPanel pnlBilling;
    private javax.swing.JPanel pnlBillingBar;
    private javax.swing.JPanel pnlBillingList;
    private javax.swing.JPanel pnlBillingMain;
    private javax.swing.JPanel pnlBillingPatient;
    private javax.swing.JPanel pnlBillingPatientTotal;
    private javax.swing.JPanel pnlBillingTable;
    private javax.swing.JPanel pnlLogin;
    private javax.swing.JPanel pnlMain;
    private javax.swing.JPanel pnlPatientList;
    private javax.swing.JPanel pnlPatientListBar;
    private javax.swing.JPanel pnlPatientListMain;
    private javax.swing.JPanel pnlPatientStatic;
    private javax.swing.JPanel pnlPatientTotal;
    private javax.swing.JPanel pnlPurchase;
    private javax.swing.JPanel pnlReport;
    private javax.swing.JPanel pnlReportBar;
    private javax.swing.JPanel pnlReportMain;
    private javax.swing.JPanel pnlReportStatic;
    private javax.swing.JPanel pnlReportTotal;
    private javax.swing.JPanel pnlSpecialization;
    private javax.swing.JPanel pnlSpecializationBar;
    private javax.swing.JPanel pnlSpecializationMain;
    private javax.swing.JPanel pnlSpecializationStatic;
    private javax.swing.JPanel pnlSpecializationTotal;
    private javax.swing.JPanel pnlStaffList;
    private javax.swing.JPanel pnlStaffListBar;
    private javax.swing.JPanel pnlStaffListMain;
    private javax.swing.JPanel pnlStaffStatistic;
    private javax.swing.JPanel pnlStaffTotal;
    private javax.swing.JPanel pnlStock;
    private javax.swing.JPanel pnlStockBar;
    private javax.swing.JPanel pnlStockMain;
    private javax.swing.JPanel pnlStockPurcahse;
    private javax.swing.JPanel pnlStockPurchaseTotal;
    private javax.swing.JPanel pnlStockStatic;
    private javax.swing.JPanel pnlStockTotal;
    private javax.swing.JPanel pnlTeatStatic;
    private javax.swing.JPanel pnlTechSkill;
    private javax.swing.JPanel pnlTechSkillBar;
    private javax.swing.JPanel pnlTechSkillMain;
    private javax.swing.JPanel pnlTechSkillStatic;
    private javax.swing.JPanel pnlTechSkilltotal;
    private javax.swing.JPanel pnlTest;
    private javax.swing.JPanel pnlTestBar;
    private javax.swing.JPanel pnlTestMain;
    private javax.swing.JPanel pnlTestPurchase;
    private javax.swing.JPanel pnlTestPurchaseTotal;
    private javax.swing.JPanel pnlTestTotal;
    private javax.swing.JPasswordField pssPassWord;
    private javax.swing.JTable tbBilling;
    private javax.swing.JTable tbPatientList;
    private javax.swing.JTable tbPatientListInBill;
    private javax.swing.JTable tbReport;
    private javax.swing.JTable tbSpecialization;
    private javax.swing.JTable tbStaffList;
    private javax.swing.JTable tbStock;
    private javax.swing.JTable tbStockPurchase;
    private javax.swing.JTable tbTechSkill;
    private javax.swing.JTable tbTest;
    private javax.swing.JTable tbTestPurchase;
    private javax.swing.JTextField txtBillingSearch;
    private javax.swing.JTextField txtPatientSearch;
    private javax.swing.JTextField txtReportSearch;
    private javax.swing.JTextField txtSpecializationSearch;
    private javax.swing.JTextField txtStaffSearch;
    private javax.swing.JTextField txtStockSearch;
    private javax.swing.JTextField txtTechSkillSearch;
    private javax.swing.JTextField txtTestSearch;
    private javax.swing.JTextField txtUserName;
    // End of variables declaration//GEN-END:variables

}
